Sdílet prostřednictvím


PROPID_M_ARRIVEDTIME

 

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

(Read-only.) The PROPID_M_ARRIVEDTIME property indicates when the message arrived at the queue.

Property ID

PROPID_M_ARRIVEDTIME

Type Indicator

VT_UI4

MQPROPVARIANT Field

ulVal

Property Value

Unsigned integer.

Remarks

The PROPID_M_ARRIVEDTIME property is attached to the message by Message Queuing. 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 or MQReceiveMessageByLookupId and examine the returned value. The type indicator of this property can be set to VT_UI4 or VT_NULL. If you set the type indicator to VT_NULL, Message Queuing automatically changes the type indicator to VT_UI4 during the function call.

Microsoft provides several time functions that can be used to manipulate the returned Coordinated Universal time value. These functions are defined in the time.h header file.

When reading messages from a queue journal, PROPID_M_ARRIVEDTIME indicates the time the original message arrived at its destination queue, not when the copy of the original message arrived in the C/C++ Code Example: Reading Messages in a Queue Journal.

When you read messages from the computer journal or dead-letter queues, PROPID_M_ARRIVETIME indicates when the message reached the journal or dead-letter queue.

Equivalent COM Property

With COM components, the equivalent property for retrieving the arrived time is MSMQMessage.ArrivedTime.

For information on See
Queue and computer journals Journal Queues
Dead-letter queues Dead-Letter Queues

Example Code

The following code fragment shows how PROPID_M_ARRIVEDTIME E is specified in arrays that can be used to initialize an MQMSGPROPS structure.

aMsgPropId[i] = PROPID_M_ARRIVEDTIME;       // Property ID  
aMsgPropVar[i].vt = VT_NULL;                // Type indicator  
i++;  

See Also

Message Properties
MQMSGPROPS
MQReceiveMessage
MQReceiveMessageByLookupId
PROPID_M_SENTTIME