home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / USE.H < prev    next >
C/C++ Source or Header  |  1997-09-05  |  7KB  |  186 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 ...  USE.H                                      *
  12.  *                                                                  *
  13.  *  This file contains information about the NetUse APIs.           *
  14.  *                                                                  *
  15.  *      Function prototypes.                                        *
  16.  *                                                                  *
  17.  *      Data structure templates.                                   *
  18.  *                                                                  *
  19.  *      Definition of special values.                               *
  20.  *                                                                  *
  21.  *                                                                  *
  22.  *  NOTE:  You must include NETCONS.H before this file, since this  *
  23.  *         file depends on values defined in NETCONS.H.             *
  24.  *                                                                  *
  25.  ********************************************************************/
  26.  
  27.  
  28. #if !defined(OS2_INCLUDED) && !defined(NETCONS_INCLUDED)
  29. typedef unsigned char UCHAR;
  30. typedef unsigned short USHORT;
  31. typedef unsigned long ULONG;
  32. #endif
  33.  
  34.  
  35. #ifndef NETUSE_INCLUDED
  36.  
  37. #define NETUSE_INCLUDED
  38.  
  39. #ifdef ANY_32_BIT
  40. #pragma pack(1)
  41. #endif
  42.  
  43.  
  44. /****************************************************************
  45.  *                                                              *
  46.  *              Function prototypes                             *
  47.  *                                                              *
  48.  ****************************************************************/
  49.  
  50. extern API_FUNCTION
  51.   NetUseAdd ( const unsigned char LSFAR * pszServer,
  52.               short              sLevel,
  53.               const unsigned char LSFAR * pbBuffer,
  54.               unsigned short     cbBuffer );
  55.  
  56. extern API_FUNCTION
  57.   NetUseDel ( const unsigned char LSFAR * pszServer,
  58.               const unsigned char LSFAR * pszDeviceName,
  59.               unsigned short     usForce );
  60.  
  61. extern API_FUNCTION
  62.   NetUseEnum ( const unsigned char LSFAR *     pszServer,
  63.                short                  sLevel,
  64.                unsigned char LSFAR *           pbBuffer,
  65.                unsigned short         cbBuffer,
  66.                unsigned short LSFAR * pcEntriesRead,
  67.                unsigned short LSFAR * pcTotalAvail );
  68.  
  69. extern API_FUNCTION
  70.   NetUseGetInfo ( const unsigned char LSFAR *     pszServer,
  71.                   const unsigned char LSFAR *     pszUseName,
  72.                   short                  sLevel,
  73.                   unsigned char LSFAR *           pbBuffer,
  74.                   unsigned short         cbBuffer,
  75.                   unsigned short LSFAR * pcbTotalAvail );
  76.  
  77.  
  78. /****************************************************************
  79.  *                                                              *
  80.  *              Data structure templates                        *
  81.  *                                                              *
  82.  ****************************************************************/
  83.  
  84.  
  85. struct use_info_0 {
  86.     unsigned char      ui0_local[DEVLEN+1];
  87.     unsigned char      ui0_pad_1;
  88.     unsigned char LSFAR * LSPTR ui0_remote;
  89. };  /* use_info_0 */
  90.  
  91. struct use_info_1 {
  92.     unsigned char      ui1_local[DEVLEN+1];
  93.     unsigned char      ui1_pad_1;
  94.     unsigned char LSFAR * LSPTR ui1_remote;
  95.     unsigned char LSFAR * LSPTR ui1_password;
  96.     unsigned short     ui1_status;
  97.     short              ui1_asg_type;
  98.     unsigned short     ui1_refcount;
  99.     unsigned short     ui1_usecount;
  100. };  /* use_info_1 */
  101.  
  102.  
  103. #ifdef PURE_32
  104. /****************************************************************
  105.  *                                                              *
  106.  *              Function prototypes                             *
  107.  *                                                              *
  108.  ****************************************************************/
  109.  
  110. extern API32_FUNCTION
  111. Net32UseAdd ( const unsigned char    * pszServer,
  112.               unsigned long    ulLevel,             /* was signed short */
  113.               const unsigned char    * pbBuffer,
  114.               unsigned long    ulBuffer );          /* was USHORT */
  115.  
  116. extern API32_FUNCTION
  117. Net32UseDel ( const unsigned char    * pszServer,
  118.               const unsigned char    * pszDeviceName,
  119.               unsigned long    ulForce );           /* was USHORT */
  120.  
  121. extern API32_FUNCTION
  122. Net32UseEnum ( const unsigned char    * pszServer,
  123.                unsigned long    ulLevel,            /* was signed short */
  124.                unsigned char  * pbBuffer,
  125.                unsigned long    ulBuffer,           /* was USHORT */
  126.                unsigned long  * pulEntriesRead,     /* was USHORT */
  127.                unsigned long  * pulTotalAvail );    /* was USHORT */
  128.  
  129. extern API32_FUNCTION
  130. Net32UseGetInfo ( const unsigned char    * pszServer,
  131.                   const unsigned char    * pszUseName,
  132.                   unsigned long    ulLevel,         /* was signed short */
  133.                   unsigned char  * pbBuffer,
  134.                   unsigned long    ulBuffer,        /* was USHORT */
  135.                   unsigned long  * pulTotalAvail ); /* was USHORT */
  136. #endif /* PURE_32 */
  137.  
  138.  
  139.  
  140. /****************************************************************
  141.  *                                                              *
  142.  *              Special values and constants                    *
  143.  *                                                              *
  144.  ****************************************************************/
  145.  
  146.  
  147. /*
  148.  *      Definitions for NetUseDel's last parameter
  149.  */
  150.  
  151. #define USE_NOFORCE             0
  152. #define USE_FORCE               1
  153. #define USE_LOTS_OF_FORCE       2
  154.  
  155.  
  156. /*
  157.  *      Values appearing in the ui1_status field of use_info_1 structure.
  158.  *      Note that USE_SESSLOST and USE_DISCONN are synonyms.
  159.  */
  160.  
  161. #define USE_OK                  0
  162. #define USE_PAUSED              1
  163. #define USE_SESSLOST            2
  164. #define USE_DISCONN             2
  165. #define USE_NETERR              3
  166. #define USE_CONN                4
  167. #define USE_RECONN              5
  168.  
  169.  
  170. /*
  171.  *      Values of the ui1_asg_type field of use_info_1 structure
  172.  */
  173.  
  174. #define USE_WILDCARD            -1
  175. #define USE_DISKDEV             0
  176. #define USE_SPOOLDEV            1
  177. #define USE_CHARDEV             2
  178. #define USE_IPC                 3
  179.  
  180.  
  181.  
  182. #ifdef ANY_32_BIT
  183. #pragma pack()
  184. #endif
  185. #endif /* NETUSE_INCLUDED */
  186.