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
The ModifyTime property of the MSMQQueueInfo object indicates when the queue properties of a public and private queue (introduced in MSMQ 2.0) were last updated.
|Data type:||Variant (Date)|
Property ModifyTime As Variant
A Variant of subtype Date containing the date and time when the queue properties were last updated (includes when the queue was created and the last time MSMQQueueInfo.Update was called).
Message Queuing sets this property, storing the value of the property when the queue is created and when MSMQQueueInfo.Update is called. Once retrieved, the value of ModifyTime can be manipulated using standard Microsoft® Visual Basic® date and time functions such as Date$ and Time$. For descriptions of Visual Basic functions, see the Visual Basic documentation.
When ModifyTime is displayed, Visual Basic automatically converts the property value to the local system time and system date.
The ModifyTime property can be used as search criteria when making a query of existing public queues. See the MSMQQuery.LookupQueue method for details on running a query.
To retrieve the ModifyTime of a queue, your application must first obtain an MSMQQueueInfo object that represents the queue. This object can be returned by a query using the MSMQQuery.LookupQueue method or created by the sending or receiving application.
Before using an application-created MSMQQueueInfo object, the application must initialize it to reference the queue by setting its MSMQQueueInfo.PathName or MSMQQueueInfo.FormatName property. For public queues, setting the FormatName property with a cached public format name instead of the PathName property frees Message Queuing from the need to retrieve information stored in the directory service to generate this format name. Direct format names can be used only for local private queues.
To retrieve the stored modify time of a queue, call the MSMQQueueInfo.Refresh method and inspect the ModifyTime property. Message Queuing stores the modify time in the directory service (for public queues) and on the local computer (for private queues). The property values of an MSMQQueueInfo object are not updated with the values stored by Message Queuing until the MSMQQueueInfo.Refresh method is called.
Equivalent API Function Property
With function calls, the equivalent property is PROPID_Q_MODIFY_TIME.
The following example is included in Using Message Queuing.
|For an example of||See|
|Retrieving the date and time when the properties of an existing queue were last modified||Visual Basic Code Example: Retrieving MSMQQueueInfo.ModifyTime|
Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Mqoai.h.
Library: Use Mqoa.lib.