Skip to main content
NCryptCloseProtectionDescriptor function

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

Syntax


NTSTATUS WINAPI NCryptCloseProtectionDescriptor(
  _In_ NCRYPT_DESCRIPTOR_HANDLE hDescriptor
);

Parameters

hDescriptor [in]

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 codeDescription
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]

Header

NCryptprotect.h

Library

NCrypt.lib

DLL

NCrypt.dll

See also

CNG DPAPI Functions
NCryptCreateProtectionDescriptor