Partager via


MQFreeSecurityContext

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The MQFreeSecurityContext function frees the memory allocated by MQGetSecurityContext or MQGetSecurityContextEx.

Note

For definitions of terms in italics, see the Message Queuing Glossary.

VOID APIENTRY MQFreeSecurityContext(  
  HANDLE hSecurityContext    
);  

Parameters

hSecurityContext

[in] Handle to the security context structure.

Return Values

None

Remarks

The security context structure is created by MQGetSecurityContext or MQGetSecurityContextEx. It contains a certificate, the private key corresponding to the public key in the certificate, and other information that Message Queuing needs to authenticate messages.

MQFreeSecurityContext and MQSendMessage must all be called within the same user context.

Requirements

Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mq.h.

Library: Use Mqrt.lib.

See Also

Message Queuing Functions
MQGetSecurityContext
MQSendMessage