home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / os2thred.zip / MSGTHRD.CPP < prev    next >
C/C++ Source or Header  |  1994-06-05  |  672b  |  33 lines

  1. // Listing 6 -- MsgThrd.cpp
  2.  
  3. //------------------------- Includes ------------------------------
  4.  
  5. #define INCL_WIN
  6. #define INCL_DOS
  7.  
  8. #include <os2.h>
  9. #include "MsgThrd.h"
  10.  
  11. //--------------------------- code --------------------------------
  12.  
  13. MsgThread::MsgThread (    PFNMSGTHRDPROC pfn, 
  14.                         USHORT usQSize, ULONG ulStack)
  15.                         : QThread(usQSize,ulStack),
  16.                           pfnMsg(pfn)
  17. {
  18.     pMsgQ = new MsgQueue(usQSize);
  19. }
  20.  
  21. MsgThread::~MsgThread ()
  22. {
  23.     delete(pMsgQ);
  24. }
  25.  
  26. BOOL MsgThread::Shutdown(ULONG ulArg)
  27. {
  28.     pfnMsg((ULONG)NULL, MSG_THRD_SHUTDOWN, 0L, 0L, ulArg);
  29.     return TRUE;
  30. }
  31.  
  32. //------------------------ end of file ----------------------------
  33.