MSMQQueue.IsOpen2

 

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

(Introduced in MSMQ 3.0.) The IsOpen2 property of the MSMQQueue object indicates whether the queue is open.

IsOpen2 is a Boolean property that supersedes the non-Boolean MSMQQueue.IsOpen property.

Data type: Boolean
Run-time access: Read-only
Property IsOpen2 As Boolean  

Property Value

A Boolean set to one of the following values:

True (-1)

The queue is open.

False (0)

The queue is not open.

Remarks

IsOpen2 returns True only when MSMQQueue.Handle is set to a valid queue handle. If Message Queuing has set MSMQQueue.Handle to INVALID_HANDLE_VALUE, IsOpen2 will always return False.

IsOpen2 supersedes MSMQQueue.IsOpen and should be used whenever possible. IsOpen2 returns Boolean values that are consistent with the Microsoft® Visual Basic® Boolean data type. In all other respects, both properties are functionally equivalent.

In C++ COM applications, you must use a smart pointer to the IMSMQQueue3 interface to expose the IsOpen2 property.

Requirements

Windows NT/2000/XP: Included in Windows XP and Windows Server 2003.

Windows 95/98/Me: Unsupported.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQQueue