home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0210 - 0219 / ibm0210-0219 / ibm0213.tar / ibm0213 / LS4APWAD.ZIP / LS40A.A12 / IBMLSA / IBM400R2 / OSLANAPI.ZIP / IBMLAN / NETSRC / H / USE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-10  |  7.4 KB  |  192 lines

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