home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / WIN_NT / LMAPI.ZIP / H / LMUSE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-07  |  3.0 KB  |  139 lines

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