NCryptGetProtectionDescriptorInfo function

The NCryptGetProtectionDescriptorInfo function retrieves a protection descriptor rule string.

Syntax


NTSTATUS WINAPI NCryptGetProtectionDescriptorInfo(
  _In_      NCRYPT_DESCRIPTOR_HANDLE hDescriptor,
  _In_opt_   const NCRYPT_ALLOC_PARA *pMemPara,
  DWORD dwInfoType,
  _Out_     void *ppvInfo
);

Parameters

hDescriptor [in]

Protection descriptor handle created by calling NCryptCreateProtectionDescriptor.

pMemPara [in, optional]

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:

ValueMeaning
NCRYPT_PROTECTION_INFO_TYPE_DESCRIPTOR_STRING

The ppvInfo argument returns the descriptor rule string.

 

ppvInfo [out]

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

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft