Share via


NCryptCloseProtectionDescriptor, fonction (ncryptprotect.h)

La fonction NCryptCloseProtectionDescriptor met à zéro et libère un objet de descripteur de protection et libère son handle.

Syntaxe

SECURITY_STATUS NCryptCloseProtectionDescriptor(
  [in] NCRYPT_DESCRIPTOR_HANDLE hDescriptor
);

Paramètres

[in] hDescriptor

Handle d’un descripteur de protection créé en appelant NCryptCreateProtectionDescriptor.

Valeur retournée

Retourne un code status qui indique la réussite ou l’échec de la fonction. Les codes de retour possibles incluent, sans s’y limiter, les éléments suivants.

Code de retour Description
ERROR_SUCCESS
La fonction a réussi.
NTE_INVALID_HANDLE
Le handle spécifié par le paramètre hDescriptor ne peut pas être NULL et doit représenter un descripteur valide.

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows 8 [applications de bureau uniquement]
Serveur minimal pris en charge Windows Server 2012 [applications de bureau uniquement]
Plateforme cible Windows
En-tête ncryptprotect.h
Bibliothèque NCrypt.lib
DLL NCrypt.dll

Voir aussi

Fonctions DPAPI CNG

NCryptCreateProtectionDescriptor