A version of this page is also available for
This function opens a handle to an existing message queue based on a message queue handle.
[in] Handle to a source process that owns the
hMsgQ message queue handle.
[in] Event handle to a message queue returned by the
[in] Pointer to an
MSGQUEUEOPTIONS structure that sets the properties of the message queue.
A handle to a message queue indicates success. NULL indicates that the queue could not be opened.
CloseMsgQueue function to close the handle returned by the OpenMsgQueue function. When called, the OpenMsgQueue function checks only the values of the dwSize and bReadAccess members of the lpOptions parameter.
Header msgqueue.h Library coredll.lib Windows Embedded CE Windows CE .NET 4.0 and later Windows Mobile Windows Mobile Version 5.0 and later