home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / use.h < prev    next >
C/C++ Source or Header  |  1999-04-29  |  7KB  |  191 lines

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