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.

153 lines
3.2 KiB

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