win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
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