BCryptEnumProviders function
The BCryptEnumProviders function obtains all of the CNG providers that support a specified algorithm.
Syntax
NTSTATUS WINAPI BCryptEnumProviders( _In_ LPCWSTR pszAlgId, _Out_ ULONG *pImplCount, _Out_ BCRYPT_PROVIDER_NAME **ppImplList, _In_ ULONG dwFlags );
Parameters
- pszAlgId [in]
-
A pointer to a null-terminated Unicode string that identifies the algorithm to obtain the providers for. This can be one of the predefined CNG Algorithm Identifiers or another algorithm identifier.
- pImplCount [out]
-
A pointer to a ULONG variable to receive the number of elements in the ppImplList array.
- ppImplList [out]
-
The address of an array of BCRYPT_PROVIDER_NAME structures to receive the collection of providers that support the specified algorithm. The pImplCount parameter receives the number of elements in this array. This memory must be freed when it is no longer needed by passing this pointer to the BCryptFreeBuffer function.
- dwFlags [in]
-
A set of flags that modifies the behavior of this function. There are currently no flags defined, so this parameter must be zero.
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. |
|
A memory allocation failure occurred. |
Remarks
BCryptEnumProviders can be called either from user mode or kernel mode. Kernel mode callers must be executing at PASSIVE_LEVEL IRQL.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also