home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / MAILSLOT.H < prev    next >
C/C++ Source or Header  |  1997-09-05  |  6KB  |  140 lines

  1. /**************************************************************************/
  2. /*                                                                        */
  3. /*              IBM OS/2(tm) File and Print Client Services               */
  4. /* (c) Copyright International Business Machines Corporation, 1988, 1996  */
  5. /*                                                                        */
  6. /**************************************************************************/
  7. /********************************************************************/
  8.  
  9. /********************************************************************
  10.  *                                                                  *
  11.  *  About this file ...  MAILSLOT.H                                 *
  12.  *                                                                  *
  13.  *  This file contains information about the Mailslot APIs.         *
  14.  *                                                                  *
  15.  *      Function prototypes.                                        *
  16.  *                                                                  *
  17.  ********************************************************************/
  18.  
  19.  
  20. #ifndef NETMAILSLOT_INCLUDED
  21.  
  22. #define NETMAILSLOT_INCLUDED
  23.  
  24. #ifdef ANY_32_BIT
  25. #pragma pack(1)
  26. #endif
  27.  
  28.  
  29. /****************************************************************
  30.  *                                                              *
  31.  *               Function prototypes - Mailslot                 *
  32.  *                                                              *
  33.  ****************************************************************/
  34.  
  35. extern API_FUNCTION
  36.   DosMakeMailslot ( const unsigned char LSFAR * pszName,
  37.                     unsigned short              cbMessageSize,
  38.                     unsigned short              cbMailslotSize,
  39.                     unsigned LSINT LSFAR *      phMailslot );
  40.  
  41. extern API_FUNCTION
  42.   DosDeleteMailslot ( unsigned LSINT hMailslot );
  43.  
  44. extern API_FUNCTION
  45.   DosMailslotInfo ( unsigned LSINT         hMailslot,
  46.                     unsigned short LSFAR * pcbMessageSize,
  47.                     unsigned short LSFAR * pcbMailslotSize,
  48.                     unsigned short LSFAR * pcbNextSize,
  49.                     unsigned short LSFAR * pusNextPriority,
  50.                     unsigned short LSFAR * pcMessages);
  51.  
  52. extern API_FUNCTION
  53.   DosPeekMailslot ( unsigned  LSINT        hMailslot,
  54.                     unsigned char LSFAR *  pbBuffer,
  55.                     unsigned short LSFAR * pcbReturned,
  56.                     unsigned short LSFAR * pcbNextSize,
  57.                     unsigned short LSFAR * pusNextPriority );
  58.  
  59. extern API_FUNCTION
  60.   DosReadMailslot ( unsigned  LSINT        hMailslot,
  61.                     unsigned char LSFAR *  pbBuffer,
  62.                     unsigned short LSFAR * pcbReturned,
  63.                     unsigned short LSFAR * pcbNextSize,
  64.                     unsigned short LSFAR * pusNextPriority,
  65.                     long                   cTimeout );
  66.  
  67. extern API_FUNCTION
  68.   DosWriteMailslot ( const unsigned char LSFAR * pszName,
  69.                      const unsigned char LSFAR * pbBuffer,
  70.                      unsigned short              cbBuffer,
  71.                      unsigned short              usPriority,
  72.                      unsigned short              usClass,
  73.                      long                        cTimeout );
  74.  
  75.  
  76.  
  77. #ifdef PURE_32
  78. /****************************************************************
  79.  *                                                              *
  80.  *               Function prototypes - Mailslot                 *
  81.  *                                                              *
  82.  ****************************************************************/
  83.  
  84. extern API32_FUNCTION
  85. Dos32MakeMailslot ( const unsigned char * pszName,
  86.                     unsigned long         ulMessageSize,  /* was USHORT*/
  87.                     unsigned long         ulMailslotSize, /* was USHORT*/
  88.                     unsigned long       * phMailslot );  /* was unsigned LSINT*/
  89.  
  90. extern API32_FUNCTION
  91. Dos32DeleteMailslot ( unsigned long  hMailslot );
  92.  
  93. extern API32_FUNCTION
  94. Dos32MailslotInfo ( unsigned long    hMailslot,        /* was unsigned LSINT */
  95.                     unsigned long  * pulMessageSize,   /* was USHORT */
  96.                     unsigned long  * pulMailslotSize,  /* was USHORT */
  97.                     unsigned long  * pulNextSize,      /* was USHORT */
  98.                     unsigned long  * pulNextPriority,  /* was USHORT */
  99.                     unsigned long  * pulMessages);     /* was USHORT */
  100.  
  101. extern API32_FUNCTION
  102. Dos32PeekMailslot ( unsigned long    hMailslot,        /* was unsigned LSINT */
  103.                     unsigned char  * pbBuffer,
  104.                     unsigned long  * pulReturned,      /* was USHORT */
  105.                     unsigned long  * pulNextSize,      /* was USHORT */
  106.                     unsigned long  * pulNextPriority); /* was USHORT */
  107.  
  108. extern API32_FUNCTION
  109. Dos32ReadMailslot ( unsigned long    hMailslot,        /* was unsigned LSINT */
  110.                     unsigned char  * pbBuffer,
  111.                     unsigned long  * pulReturned,      /* was USHORT */
  112.                     unsigned long  * pulNextSize,      /* was USHORT */
  113.                     unsigned long  * pulNextPriority,  /* was USHORT */
  114.                     long             lTimeout );
  115.  
  116. extern API32_FUNCTION
  117. Dos32WriteMailslot ( const unsigned char * pszName,
  118.                      const unsigned char * pbBuffer,
  119.                      unsigned long         ulBuffer,     /* was USHORT */
  120.                      unsigned long         ulPriority,   /* was USHORT */
  121.                      unsigned long         ulClass,      /* was USHORT */
  122.                      long                  lTimeout );
  123. #endif /* PURE_32 */
  124.  
  125.  
  126. /****************************************************************
  127.  *                                                              *
  128.  *              Special values and constants - Mailslot         *
  129.  *                                                              *
  130.  ****************************************************************/
  131.  
  132. #define MAILSLOT_NO_TIMEOUT     -1
  133.  
  134. #ifdef ANY_32_BIT
  135. #pragma pack()
  136. #endif
  137.  
  138. #endif /* NETMAILSLOT_INCLUDED */
  139.  
  140.