Share via


MQFreeMemory

 

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 MQFreeMemory function frees memory allocated by Message Queuing.

VOID MQFreeMemory(  
  PVOID pvMemory    
);  

Parameters

pvMemory

[in] Pointer to the memory to be freed.

Remarks

Whenever an application passes VT_NULL in an aPropVar array and Message Queuing allocates memory for the returned property value (for example, puuid and pwszVal), MQFreeMemory must be called.

For MQLocateNext, all properties whose values returned by Message Queuing are stored outside aPropVar must also be freed using MQFreeMemory.

Example Code

The following code examples are included in Using Message Queuing.

For an example of See
Using MQFreeMemory to free memory allocated for a string C/C++ Code Example: Retrieving PROPID_Q_LABEL

 C/C++ Code Example: Retrieving PROPID_Q_MULTICAST_ADDRESS

 C/C++ Code Example: Retrieving PROPID_Q_PATHNAME

 C/C++ Code Example: Retrieving PROPID_Q_PATHNAME_DNS
Using MQFreeMemory to free memory allocated for an array of strings C/C++ Code Example: Obtaining a List of Private Queues

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
aPropVar
MQLocateNext