PROPID_Q_MODIFY_TIME
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
(Optional.) The PROPID_Q_MODIFY_TIME property indicates the last time when the properties of a queue were modified.
Property ID
PROPID_Q_MODIFY_TIME
Type Indicator
VT_I4
MQPROPVARIANT Field
lVal
Property Value
Time at which the properties of the queue were last set.
Remarks
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.
Note
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.
Example Code
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 | C/C++ Code Example: Retrieving PROPID_Q_MODIFY_TIME |
See Also
Queue Properties
MQCreateQueue
MQGetQueueProperties
MQLocateBegin
MQQUEUEPROPS
MQSetQueueProperties