次の方法で共有


PROPID_M_ARRIVEDTIME (Compact 2013)

3/26/2014

This property indicates when the message arrived at the queue.

  • Type Indicator
    VT_UI4 (or VT_NULL)
  • PROPVARIANT Field
    ulVal
  • Property Values
    Unsigned integer.

Remarks

The PROPID_M_ARRIVEDTIME property is attached to the message by MSMQ. The arrival time returned is the number of seconds elapsed since midnight (00:00:00), January 1, 1970 (Coordinated Universal time) according to the system clock.

To retrieve the arrived time of a message, specify PROPID_M_ARRIVEDTIME in the MQMSGPROPS structure. Then call MQReceiveMessage and examine the returned value.

When specifying PROPID_M_ARRIVEDTIME, you can set its Type Indicator to VT_NULL. When the Type Indicator is set to VT_NULL, MSMQ sets the VT field to the appropriate type indicator.

Microsoft provides several time functions you can use to manipulate the returned Coordinated Universal time value.

When reading messages from a journal queue, PROPID_M_ARRIVETIME indicates the time the original message arrived at its destination queue, not when the copy of the original message arrived in the queue journal.

When reading messages from machine journal or dead-letter queues, PROPID_M_ARRIVETIME indicates when the message reached the journal or dead-letter queue.

Examples

This example shows how PROPID_M_ARRIVEDTIME is specified in the MQMSGPROPS structure.

aMsgPropId[i] = PROPID_M_ARRIVEDTIME;        // Property ID
aMsgPropVar[i].vt = VT_UI4;                  // Type indicator
aMsgPropVar[i].ulVal = dwArrivedTime;        // Value
i++;

Note

OS versions prior to 2.12 require the MSMQ add-on pack.

Requirements

Header

mq.h

See Also

Reference

MSMQ Properties
MQReceiveMessage
PROPID_M_SENTTIME
MQMSGPROPS