Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
3.7 KiB

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