BCryptCloseAlgorithmProvider

The BCryptCloseAlgorithmProvider function closes an algorithm provider.

Syntax

NTSTATUS BCryptCloseAlgorithmProvider(
         BCRYPT_ALG_HANDLE hAlgorithm,
         ULONG dwFlags
)  

Parameters

hAlgorithm
Type: BCRYPT_ALG_HANDLE 

[in, out] A handle that represents the algorithm provider to close. This handle is obtained by calling the BCryptOpenAlgorithmProvider function.

dwFlags
Type: ULONG 

[in] A set of flags that modify the behavior of this function. No flags are defined for this function.

Return value

Type: NTSTATUS 

Returns a status code that indicates the success or failure of the function.

Return codes

Possible return codes include, but are not limited to, the following.

Return code Description
STATUS_SUCCESS The function was successful.
STATUS_INVALID_HANDLE The algorithm handle in the hAlgorithm parameter is not valid.

Remarks

BCryptCloseAlgorithmProvider can be called either from user mode or kernel mode. Kernel mode callers must be executing at PASSIVE_LEVELIRQL.

Requirements

Header: Declared in bcrypt.h.

Library: Use bcrypt.lib.