(Optional.) The PROPID_Q_MODIFY_TIME property indicates the last time when the properties of a queue were modified.
Time at which the properties of the queue were last set.
The PROPID_Q_MODIFY_TIME property is set by Message Queuing when MQCreateQueue is called and then reset by Message Queuing each time the properties of the queue are modified by calls to MQSetQueueProperties.
The time returned by Message Queuing is the number of seconds elapsed since midnight (00:00:00), January 1, 1970 (Coordinated Universal time) according to the system clock.
There are several related C run-time functions that can be used to manipulate the value of PROPID_Q_MODIFY_TIME. For example, ctime() can be used to display the local date and time when the properties of the queue were last modified.
|Details on the C run-time functions can be found in the Platform SDK. When using these functions, include the time.h header file in your source code.|
To retrieve the date and time at which the queue properties were last modified, specify PROPID_Q_MODIFY_TIME in the MQQUEUEPROPS structure, and then call MQGetQueueProperties (or MQLocateBegin when starting a query) and examine its returned value.
When retrieving this property, the type indicator can be set to VT_I4 or VT_NULL. If you set the type indicator equal to VT_NULL, Message Queuing automatically changes the type indicator to VT_I4 during the function call.
An MQ_ERROR_PROPERTY_NOTALLOWED error is returned if any attempt is made to set this property.
Equivalent COM Property
When using COM components, the time when the queue properties were last modified can be retrieved using the MSMQQueueInfo.ModifyTime property.
The following code fragment shows how PROPID_Q_MODIFY_TIME is specified in arrays that can be used to initialize an MQQUEUEPROPS structure for retrieving the date and time at which the properties of the queue were last modified.
//To retrieve the date and time aQueuePropID[i] = PROPID_Q_MODIFY_TIME; // Property identifier aQueuePropVar[i].vt = VT_NULL; // Type indicator i++;
The following example is included in Using Message Queuing.
|For an example of||See|
Retrieving the time when the properties of the queue were last modified