home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / LMUSE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  3.6 KB  |  167 lines

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