home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / LMUSE.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  4KB  |  178 lines

  1. /*++ BUILD Version: 0001    // Increment this if a change has global effects
  2.  
  3. Module Name:
  4.  
  5.     lmuse.c
  6.  
  7. Abstract:
  8.  
  9.     This file contains structures, function prototypes, and definitions
  10.     for the NetUse API.
  11.  
  12. Author:
  13.  
  14.     Dan Lafferty (danl) 10-Mar-1991
  15.  
  16.  
  17. Environment:
  18.  
  19.     User Mode - Win32
  20.     Portable to any flat, 32-bit environment.  (Uses Win32 typedefs.)
  21.     Requires ANSI C extensions: slash-slash comments, long external names.
  22.  
  23. Notes:
  24.  
  25.     You must include NETCONS.H before this file, since this file depends
  26.     on values defined in NETCONS.H.
  27.  
  28. Revision History:
  29.  
  30.     10-Mar-1991 danl
  31.         Created from LM2.0 header files and NT-LAN API Spec.
  32.     14-Mar-91 JohnRo
  33.         Put OPTIONAL keywords back in.
  34.     19-Mar-91 ritaw
  35.         Added info structure for level 2, and indicies to the parameters in
  36.         this info structure.
  37.     10-Apr-1991 JohnRo
  38.         Clarify argument names for NetpSetParmError use.
  39.     12-Jun-1991 JohnRo
  40.         Changed to use UNICODE types.  Clarify parameter names.
  41.  
  42. --*/
  43.  
  44. /*
  45.  *      C/C++ Run Time Library - Version 6.5
  46.  *
  47.  *      Copyright (c) 1994 by Borland International
  48.  *      All Rights Reserved.
  49.  *
  50.  */
  51.  
  52. #ifndef _LMUSE_
  53. #define _LMUSE_
  54. #define __LMUSE_H
  55.  
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59.  
  60. #include <lmuseflg.h>                   // Deletion force level flags
  61.  
  62. //
  63. // Function Prototypes
  64. //
  65.  
  66. NET_API_STATUS NET_API_FUNCTION
  67. NetUseAdd (
  68.     IN LPTSTR UncServerName OPTIONAL,
  69.     IN DWORD Level,
  70.     IN LPBYTE Buf,
  71.     OUT LPDWORD ParmError OPTIONAL
  72.     );
  73.  
  74. NET_API_STATUS NET_API_FUNCTION
  75. NetUseDel (
  76.     IN LPTSTR UncServerName OPTIONAL,
  77.     IN LPTSTR UseName,
  78.     IN DWORD ForceCond
  79.     );
  80.  
  81. NET_API_STATUS NET_API_FUNCTION
  82. NetUseEnum (
  83.     IN LPTSTR UncServerName OPTIONAL,
  84.     IN DWORD Level,
  85.     OUT LPBYTE *BufPtr,
  86.     IN DWORD PreferedMaximumSize,
  87.     OUT LPDWORD EntriesRead,
  88.     OUT LPDWORD TotalEntries,
  89.     IN OUT LPDWORD ResumeHandle
  90.     );
  91.  
  92. NET_API_STATUS NET_API_FUNCTION
  93. NetUseGetInfo (
  94.     IN LPTSTR UncServerName OPTIONAL,
  95.     IN LPTSTR UseName,
  96.     IN DWORD Level,
  97.     OUT LPBYTE *BufPtr
  98.     );
  99.  
  100. //
  101. //  Data Structures
  102. //
  103.  
  104. typedef struct _USE_INFO_0 {
  105.     LPTSTR  ui0_local;
  106.     LPTSTR  ui0_remote;
  107. }USE_INFO_0, *PUSE_INFO_0, *LPUSE_INFO_0;
  108.  
  109. typedef struct _USE_INFO_1 {
  110.     LPTSTR  ui1_local;
  111.     LPTSTR  ui1_remote;
  112.     LPTSTR  ui1_password;
  113.     DWORD   ui1_status;
  114.     DWORD   ui1_asg_type;
  115.     DWORD   ui1_refcount;
  116.     DWORD   ui1_usecount;
  117. }USE_INFO_1, *PUSE_INFO_1, *LPUSE_INFO_1;
  118.  
  119. typedef struct _USE_INFO_2 {
  120.     LPTSTR   ui2_local;
  121.     LPTSTR   ui2_remote;
  122.     LPTSTR   ui2_password;
  123.     DWORD    ui2_status;
  124.     DWORD    ui2_asg_type;
  125.     DWORD    ui2_refcount;
  126.     DWORD    ui2_usecount;
  127.     LPTSTR   ui2_username;
  128.     LPTSTR   ui2_domainname;
  129. }USE_INFO_2, *PUSE_INFO_2, *LPUSE_INFO_2;
  130.  
  131.  
  132. //
  133. // Special Values and Constants
  134. //
  135.  
  136. //
  137. // One of these values indicates the parameter within an information
  138. // structure that is invalid when ERROR_INVALID_PARAMETER is returned by
  139. // NetUseAdd.
  140. //
  141.  
  142. #define USE_LOCAL_PARMNUM       1
  143. #define USE_REMOTE_PARMNUM      2
  144. #define USE_PASSWORD_PARMNUM    3
  145. #define USE_ASGTYPE_PARMNUM     4
  146. #define USE_USERNAME_PARMNUM    5
  147. #define USE_DOMAINNAME_PARMNUM  6
  148.  
  149. //
  150. // Values appearing in the ui1_status field of use_info_1 structure.
  151. // Note that USE_SESSLOST and USE_DISCONN are synonyms.
  152. //
  153.  
  154. #define USE_OK                  0
  155. #define USE_PAUSED              1
  156. #define USE_SESSLOST            2
  157. #define USE_DISCONN             2
  158. #define USE_NETERR              3
  159. #define USE_CONN                4
  160. #define USE_RECONN              5
  161.  
  162.  
  163. //
  164. // Values of the ui1_asg_type field of use_info_1 structure
  165. //
  166.  
  167. #define USE_WILDCARD            ( (DWORD) (-1) )
  168. #define USE_DISKDEV             0
  169. #define USE_SPOOLDEV            1
  170. #define USE_CHARDEV             2
  171. #define USE_IPC                 3
  172.  
  173. #ifdef __cplusplus
  174. }
  175. #endif
  176.  
  177. #endif // _LMUSE_
  178.