BCryptQueryProviderRegistration function (bcrypt.h)
The BCryptQueryProviderRegistration function retrieves information about a CNG provider.
NTSTATUS BCryptQueryProviderRegistration( LPCWSTR pszProvider, ULONG dwMode, ULONG dwInterface, ULONG *pcbBuffer, PCRYPT_PROVIDER_REG *ppBuffer );
A pointer to a null-terminated Unicode string that contains the name of the provider to obtain information about.
Specifies the type of information to retrieve. This can be one of the following values.
Specifies the interface to retrieve information for. This can be one of the following values.
A pointer to a ULONG value that, on entry, contains the size, in bytes, of the buffer pointed to by the ppBuffer parameter. On exit, this value receives either the number of bytes copied to the buffer or the required size, in bytes, of the buffer.
A pointer to a buffer pointer that receives a CRYPT_PROVIDER_REG structure and other data that describes the provider.
If this parameter is NULL, this function will return STATUS_BUFFER_TOO_SMALL and place in the value pointed to by the pcbBuffer parameter, the required size, in bytes, of all data.
If this parameter is the address of a NULL pointer, this function will allocate the required memory, fill it in with the provider information, and place a pointer to this memory in this parameter. When you have finished using this memory, free it by passing this pointer to the BCryptFreeBuffer function.
If this parameter is the address of a non-NULL pointer, this function will copy the provider information into this buffer. The pcbBuffer parameter must contain the size, in bytes, of the entire buffer. If the buffer is not large enough to hold all of the provider information, this function will return STATUS_BUFFER_TOO_SMALL.
Returns a status code that indicates the success or failure of the function.
Possible return codes include, but are not limited to, the following.
||The function was successful.|
||One or more parameters are not valid.|
||The size specified by the pcbBuffer parameter is not large enough to hold all of the data.|
||No provider could be found that matches the specified criteria.|
BCryptQueryProviderRegistration can be called only in user mode.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|