This function creates a message queue.
#define INCL_WINMESSAGEMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */ #include <os2.h> HAB hab; /* Anchor-block handle. */ LONG lQueuesize; /* Maximum queue size. */ HMQ hmq; /* Message-queue handle. */ hmq = WinCreateMsgQueue(hab, lQueuesize);