Number of bytes in the binary array specified by the pbData parameter.

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 ppbProtectedBlob parameter.

hWnd [in, optional]

Handle to the parent window of the user interface, if any, to be displayed.

ppbProtectedBlob [out]

Address of a variable that receives a pointer to the encrypted data.

pcbProtectedBlob [out]

Pointer to a ULONG variable that contains the size, in bytes, of the encrypted data pointed to by the ppbProtectedBlob variable.

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 pbData, ppbProtectedBlob, and pcbProtectedBlob parameters cannot be NULL.