BCryptFreeBuffer function (bcrypt.h)

The BCryptFreeBuffer function is used to free memory that was allocated by one of the CNG functions.

Syntax

void BCryptFreeBuffer(
  [in] PVOID pvBuffer
);

Parameters

[in] pvBuffer

A pointer to the memory buffer to be freed.

Return value

None

Remarks

BCryptFreeBuffer must be called in the same processor mode as the BCrypt API function that allocated the buffer. In addition, if the buffer was allocated at PASSIVE_LEVEL IRQL, it must be freed at that IRQL. If the buffer was allocated at DISPATCH_LEVEL IRQL, it can be freed at either DISPATCH_LEVEL IRQL or PASSIVE_LEVEL IRQL.

To call this function in kernel mode, use Cng.lib, which is part of the Driver Development Kit (DDK). Windows Server 2008 and Windows Vista:  To call this function in kernel mode, use Ksecdd.lib.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header bcrypt.h
Library Bcrypt.lib
DLL Bcrypt.dll

See also

BCryptEnumContexts

BCryptEnumRegisteredProviders

BCryptQueryProviderRegistration