Compartir a través de


PROPID_Q_CREATE_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, read-only.) The PROPID_Q_CREATE_TIME property indicates the time and date when the queue was created.

Property ID

PROPID_Q_CREATE_TIME

Type Indicator

VT_I4

MQPROPVARIANT Field

lVal

Property Value

Time when the queue was created.

Remarks

This property is set by Message Queuing when MQCreateQueue is called. An error is returned (MQ_ERROR_PROPERTY_NOTALLOWED) if any attempt is made to set this property. The time returned 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_CREATE_TIME. For example, ctime() can be used to display the local date and time the queue was created.

Note

Details on the C run-time functions can be found in the Platform SDK. When using these functions, include time.h in your source code.

To retrieve the date and time a queue was created, specify PROPID_Q_CREATE_TIME in the MQQUEUEPROPS structure and call MQGetQueueProperties and examine its returned value.

When retrieving the queue creation date and time, 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.

Equivalent COM Property

When using COM components, the time the queue was created can be retrieved using the MSMQQueueInfo.CreateTime property.

Example Code

The following code fragment shows how PROPID_Q_CREATE_TIME is specified in arrays that can be used to initialize an MQQUEUEPROPS structure for retrieving the date and time when the queue was created.

//To retrieve the date and time  
aQueuePropID[i] = PROPID_Q_CREATE_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 and date the queue was created C/C++ Code Example: Retrieving PROPID_Q_CREATE_TIME

See Also

Queue Properties
MQCreateQueue
MQGetQueueProperties
MQQUEUEPROPS