home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / sdk / winh / winnt / lmuse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-11  |  3.3 KB  |  154 lines

  1. /*++ BUILD Version: 0001    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1991-1995  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. #define _LMUSE_
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. #include <lmuseflg.h>                   // Deletion force level flags
  37.  
  38. //
  39. // Function Prototypes
  40. //
  41.  
  42. NET_API_STATUS NET_API_FUNCTION
  43. NetUseAdd (
  44.     IN LPTSTR UncServerName OPTIONAL,
  45.     IN DWORD Level,
  46.     IN LPBYTE Buf,
  47.     OUT LPDWORD ParmError OPTIONAL
  48.     );
  49.  
  50. NET_API_STATUS NET_API_FUNCTION
  51. NetUseDel (
  52.     IN LPTSTR UncServerName OPTIONAL,
  53.     IN LPTSTR UseName,
  54.     IN DWORD ForceCond
  55.     );
  56.  
  57. NET_API_STATUS NET_API_FUNCTION
  58. NetUseEnum (
  59.     IN LPTSTR UncServerName OPTIONAL,
  60.     IN DWORD Level,
  61.     OUT LPBYTE *BufPtr,
  62.     IN DWORD PreferedMaximumSize,
  63.     OUT LPDWORD EntriesRead,
  64.     OUT LPDWORD TotalEntries,
  65.     IN OUT LPDWORD ResumeHandle
  66.     );
  67.  
  68. NET_API_STATUS NET_API_FUNCTION
  69. NetUseGetInfo (
  70.     IN LPTSTR UncServerName OPTIONAL,
  71.     IN LPTSTR UseName,
  72.     IN DWORD Level,
  73.     OUT LPBYTE *BufPtr
  74.     );
  75.  
  76. //
  77. //  Data Structures
  78. //
  79.  
  80. typedef struct _USE_INFO_0 {
  81.     LPTSTR  ui0_local;
  82.     LPTSTR  ui0_remote;
  83. }USE_INFO_0, *PUSE_INFO_0, *LPUSE_INFO_0;
  84.  
  85. typedef struct _USE_INFO_1 {
  86.     LPTSTR  ui1_local;
  87.     LPTSTR  ui1_remote;
  88.     LPTSTR  ui1_password;
  89.     DWORD   ui1_status;
  90.     DWORD   ui1_asg_type;
  91.     DWORD   ui1_refcount;
  92.     DWORD   ui1_usecount;
  93. }USE_INFO_1, *PUSE_INFO_1, *LPUSE_INFO_1;
  94.  
  95. typedef struct _USE_INFO_2 {
  96.     LPTSTR   ui2_local;
  97.     LPTSTR   ui2_remote;
  98.     LPTSTR   ui2_password;
  99.     DWORD    ui2_status;
  100.     DWORD    ui2_asg_type;
  101.     DWORD    ui2_refcount;
  102.     DWORD    ui2_usecount;
  103.     LPTSTR   ui2_username;
  104.     LPTSTR   ui2_domainname;
  105. }USE_INFO_2, *PUSE_INFO_2, *LPUSE_INFO_2;
  106.  
  107.  
  108. //
  109. // Special Values and Constants
  110. //
  111.  
  112. //
  113. // One of these values indicates the parameter within an information
  114. // structure that is invalid when ERROR_INVALID_PARAMETER is returned by
  115. // NetUseAdd.
  116. //
  117.  
  118. #define USE_LOCAL_PARMNUM       1
  119. #define USE_REMOTE_PARMNUM      2
  120. #define USE_PASSWORD_PARMNUM    3
  121. #define USE_ASGTYPE_PARMNUM     4
  122. #define USE_USERNAME_PARMNUM    5
  123. #define USE_DOMAINNAME_PARMNUM  6
  124.  
  125. //
  126. // Values appearing in the ui1_status field of use_info_1 structure.
  127. // Note that USE_SESSLOST and USE_DISCONN are synonyms.
  128. //
  129.  
  130. #define USE_OK                  0
  131. #define USE_PAUSED              1
  132. #define USE_SESSLOST            2
  133. #define USE_DISCONN             2
  134. #define USE_NETERR              3
  135. #define USE_CONN                4
  136. #define USE_RECONN              5
  137.  
  138.  
  139. //
  140. // Values of the ui1_asg_type field of use_info_1 structure
  141. //
  142.  
  143. #define USE_WILDCARD            ( (DWORD) (-1) )
  144. #define USE_DISKDEV             0
  145. #define USE_SPOOLDEV            1
  146. #define USE_CHARDEV             2
  147. #define USE_IPC                 3
  148.  
  149. #ifdef __cplusplus
  150. }
  151. #endif
  152.  
  153. #endif // _LMUSE_
  154.