This documentation is archived and is not being maintained.

MessageQueue.ReadHandle Property

Gets the native handle used to read messages from the message queue.

[Visual Basic]
Public ReadOnly Property ReadHandle As IntPtr
public IntPtr ReadHandle {get;}
public: __property IntPtr get_ReadHandle();
public function get ReadHandle() : IntPtr;

Property Value

A handle to the native queue object that you use for peeking and receiving messages from the queue.


Exception Type Condition
MessageQueueException An error occurred when accessing a Message Queuing API.


The ReadHandle provides a native Windows handle to the message queue object that is used for peeking and receiving messages from the queue. If you change the path of the queue, the handle is closed and reopened with a new value.

The following table shows whether this property is available in various Workgroup modes.

Workgroup Mode Available
Local computer Yes
Local computer + direct format name Yes
Remote computer No
Remote computer + direct format name Yes


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

MessageQueue Class | MessageQueue Members | System.Messaging Namespace | CanRead | WriteHandle