CryptMsgClose function (wincrypt.h)

The CryptMsgClose function closes a cryptographic message handle. At each call to this function, the reference count on the message is reduced by one. When the reference count reaches zero, the message is fully released.

Syntax

BOOL CryptMsgClose(
  [in] HCRYPTMSG hCryptMsg
);

Parameters

[in] hCryptMsg

Handle of the cryptographic message to be closed.

Return value

If the function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE). For extended error information, call GetLastError.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header wincrypt.h
Library Crypt32.lib
DLL Crypt32.dll

See also

CryptMsgOpenToDecode

CryptMsgOpenToEncode

Low-level Message Functions

Simplified Message Functions