Fonction PsAttachSiloToCurrentThread (ntddk.h)

Cette routine place temporairement un thread dans le silo spécifié.

Syntaxe

PESILO PsAttachSiloToCurrentThread(
  [in] PESILO Silo
);

Paramètres

[in] Silo

Silo que le thread doit emprunter l’identité. L’appelant doit contenir une référence au silo pendant toute la durée de l’emprunt d’identité.

Valeur retournée

Silo précédent attaché au thread actuel.

Remarques

Le silo spécifié est attaché au thread actuel afin qu’il devienne le silo effectif du thread.

Le thread fonctionne ensuite dans l’espace de noms du silo attaché jusqu’à ce que PsDetachSiloFromCurrentThread soit appelé.

Exemples

PESILO PreviousSilo = PsAttachSiloToCurrentThread(SomeSilo);

// Do work within the silo context

PsDetachSiloFromCurrentThread(PreviousSilo);</pre>

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows 10, version 1607
Serveur minimal pris en charge Windows Server 2016
Plateforme cible Windows
En-tête ntddk.h

Voir aussi

PsDetachsiloFromCurrentThread