BCryptQueryProviderRegistration function (bcrypt.h)
The BCryptQueryProviderRegistration function retrieves information about a CNG provider.
Syntax
NTSTATUS BCryptQueryProviderRegistration(
[in] LPCWSTR pszProvider,
[in] ULONG dwMode,
[in] ULONG dwInterface,
[in, out] ULONG *pcbBuffer,
[in, out] PCRYPT_PROVIDER_REG *ppBuffer
);
Parameters
[in] pszProvider
A pointer to a null-terminated Unicode string that contains the name of the provider to obtain information about.
[in] dwMode
Specifies the type of information to retrieve. This can be one of the following values.
[in] dwInterface
Specifies the interface to retrieve information for. This can be one of the following values.
[in, out] pcbBuffer
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.
[in, out] ppBuffer
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.
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 |
---|---|
|
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. |
Remarks
BCryptQueryProviderRegistration can be called only in user mode.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | bcrypt.h |
Library | Bcrypt.lib |
DLL | Bcrypt.dll |