home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lansystk.zip / INCLUDE / LANSERV / USE.H < prev    next >
C/C++ Source or Header  |  1998-05-08  |  7KB  |  191 lines

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