win12.hlp (Table of Contents; Topic list)
WinQueryQueueInfo (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMESSAGEMGR
 
BOOL WinQueryQueueInfo(hmq, pmqi, cbCopy);
HMQ hmq;          /* handle of the message queue                */
PMQINFO pmqi;     /* address of structure for queue information */
USHORT cbCopy;    /* number of bytes of information to copy     */
 
The WinQueryQueueInfo function is used to obtain information about a
specified queue, such as the process and thread identifier associated with
the queue, the maximum number of messages the queue can hold, and the queue
procedure address.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hmq        Identifies the message queue. This handle must either have been
           created by a previous call to WinCreateMsgQueue, or it must be
           HMQ_CURRENT to specify the message queue of the thread that is
           calling this function.
 
pmqi       Points to an MQINFO structure that will receive information about
           the message queue.
 
cbCopy     Specifies the number of bytes of data that will be copied into
           the MQINFO structure. Normally, it should be set to the length of
           the structure.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
Comments
 
An important side effect of this function is that a DLL procedure or hook
can use this function to find out if the current thread has a message queue
associated with it.
 
See Also
 
WinCreateMsgQueue, MQINFO