NCryptCloseProtectionDescriptor function

The NCryptCloseProtectionDescriptor function zeros and frees a protection descriptor object and releases its handle.

Syntax

SECURITY_STATUS NCryptCloseProtectionDescriptor(
  NCRYPT_DESCRIPTOR_HANDLE hDescriptor
);

Parameters

hDescriptor

Handle of a protection descriptor created by calling NCryptCreateProtectionDescriptor.

Return Value

Returns a status code that indicates the success or failure of the function. Possible return codes include, but are not limited to, the following.

Return code Description
ERROR_SUCCESS
The function was successful.
NTE_INVALID_HANDLE
The handle specified by the hDescriptor parameter cannot be NULL and it must represent a valid descriptor.

Requirements

   
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header ncryptprotect.h
Library NCrypt.lib
DLL NCrypt.dll

See Also

CNG DPAPI Functions

NCryptCreateProtectionDescriptor