WinQueueFromID returns the handle of the queue that was created by the specified thread.
#define INCL_WINMESSAGEMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ PID pid; /* Process identity. */ TID tid; /* Thread identity. */ HMQ hmq; /* Queue handle. */ hmq = WinQueueFromID(hab, pid, tid);