The PROPID_M_CLASS property indicates message type. A message can be a normal MSMQ message, a positive or negative (arrival and read) acknowledgment message, or a report message. Typically this property is set by MSMQ when it sends the message, however it can also be set by an MSMQ connector application when the connector application sends a message.
Property Values
Normal messages (all messages created by your application):
Positive acknowledgment messages (typically generated by MSMQ):
Negative arrival acknowledgment messages (typically generated by MSMQ):
Negative read acknowledgment messages (typically generated by MSMQ):
Report messages (typically generated by MSMQ):
Acknowledgment messages are typically generated by MSMQ whenever the sending application requests them. The acknowledgment message is returned to the administration queue that is specified by the sending application. For information on administration queues, see Administration Queues.
Note Acknowledgment messages can also be created by MSMQ connector applications. When the connector application creates an acknowledgment message, it must set PROPID_M_CLASS and PROPID_CONNECTOR_TYPE. For additional information, see MSMQ Connector Applications.
Report messages are typically generated by MSMQ whenever a report queue is defined at the source Queue Manager. For information on report queues, see Report Queues.
To find the class of a message, pass PROPID_M_CLASS to MQReceiveMessage and examine the returned value. When passing PROPID_M_CLASS to MQReceiveMessage, the corresponding VT field in the aPropVar array can be set to VT_NULL.
When reading messages in an administration queue or dead letter queue, retrieve PROPID_M_CLASS to find out why the message was sent to the queue.
This example shows how PROPID_M_CLASS is specified in the MQMSGPROPS structure:
MsgProps.aPropID[i] = PROPID_M_CLASS; //PROPVARIANT Field
MsgProps.aPropVar[i].vt = VT_UI2; //Type Indicator
Windows NT: Requires version 4.0 SP3 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mq.h.
Import Library: Use mqrt.lib.
Unicode: Defined only as Unicode.
MQMSGPROPS, MQSendMessage, PROPID_M_ACKNOWLEDGE, PROPID_M_PRIV_LEVEL