CryptMsgClose function

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(
  HCRYPTMSG hCryptMsg
);

Parameters

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

   
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