NCryptGetProtectionDescriptorInfo function (ncryptprotect.h)

The NCryptGetProtectionDescriptorInfo function retrieves a protection descriptor rule string.

Syntax

SECURITY_STATUS NCryptGetProtectionDescriptorInfo(
  [in]           NCRYPT_DESCRIPTOR_HANDLE hDescriptor,
  [in, optional] const NCRYPT_ALLOC_PARA  *pMemPara,
                 DWORD                    dwInfoType,
  [out]          void                     **ppvInfo
);

Parameters

[in] hDescriptor

Protection descriptor handle created by calling NCryptCreateProtectionDescriptor.

[in, optional] pMemPara

Pointer to an NCRYPT_ALLOC_PARA structure that you can use to specify custom memory management functions. If you set this argument to NULL, the LocalAlloc function is used internally to allocate memory and your application must call LocalFree to release memory pointed to by the ppvInfo parameter.

dwInfoType

Specifies how to return descriptor information to the ppvInfo parameter. This can be the following value:

Value Meaning
NCRYPT_PROTECTION_INFO_TYPE_DESCRIPTOR_STRING
The ppvInfo argument returns the descriptor rule string.

[out] ppvInfo

Pointer to the descriptor information.

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_PARAMETER
The ppvInfo parameter cannot be NULL.
NTE_NOT_SUPPORTED
An unsupported value was specified in the dwInfoType parameter.
NTE_INVALID_HANDLE
The handle specified by the hDescriptor parameter is not valid.

Requirements

Requirement Value
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