Leaked source code of windows server 2003
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.

274 lines
5.4 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1991-1999 Microsoft Corporation
  3. Module Name:
  4. lmchdev.h
  5. Abstract:
  6. This module defines the API function prototypes and data structures
  7. for the following groups of NT API functions:
  8. NetCharDev
  9. NetCharDevQ
  10. NetHandle
  11. [Environment:]
  12. User Mode - Win32
  13. [Notes:]
  14. You must include NETCONS.H before this file, since this file depends
  15. on values defined in NETCONS.H.
  16. --*/
  17. #ifndef _LMCHDEV_
  18. #define _LMCHDEV_
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. //
  26. // CharDev Class
  27. //
  28. //
  29. // Function Prototypes - CharDev
  30. //
  31. NET_API_STATUS NET_API_FUNCTION
  32. NetCharDevEnum (
  33. IN LPCWSTR servername,
  34. IN DWORD level,
  35. OUT LPBYTE *bufptr,
  36. IN DWORD prefmaxlen,
  37. OUT LPDWORD entriesread,
  38. OUT LPDWORD totalentries,
  39. IN OUT LPDWORD resume_handle
  40. );
  41. NET_API_STATUS NET_API_FUNCTION
  42. NetCharDevGetInfo (
  43. IN LPCWSTR servername,
  44. IN LPCWSTR devname,
  45. IN DWORD level,
  46. OUT LPBYTE *bufptr
  47. );
  48. NET_API_STATUS NET_API_FUNCTION
  49. NetCharDevControl (
  50. IN LPCWSTR servername,
  51. IN LPCWSTR devname,
  52. IN DWORD opcode
  53. );
  54. //
  55. // Data Structures - CharDev
  56. //
  57. typedef struct _CHARDEV_INFO_0 {
  58. LPWSTR ch0_dev;
  59. } CHARDEV_INFO_0, *PCHARDEV_INFO_0, *LPCHARDEV_INFO_0;
  60. typedef struct _CHARDEV_INFO_1 {
  61. LPWSTR ch1_dev;
  62. DWORD ch1_status;
  63. LPWSTR ch1_username;
  64. DWORD ch1_time;
  65. } CHARDEV_INFO_1, *PCHARDEV_INFO_1, *LPCHARDEV_INFO_1;
  66. //
  67. // CharDevQ Class
  68. //
  69. //
  70. // Function Prototypes - CharDevQ
  71. //
  72. NET_API_STATUS NET_API_FUNCTION
  73. NetCharDevQEnum (
  74. IN LPCWSTR servername,
  75. IN LPCWSTR username,
  76. IN DWORD level,
  77. OUT LPBYTE *bufptr,
  78. IN DWORD prefmaxlen,
  79. OUT LPDWORD entriesread,
  80. OUT LPDWORD totalentries,
  81. IN OUT LPDWORD resume_handle
  82. );
  83. NET_API_STATUS NET_API_FUNCTION
  84. NetCharDevQGetInfo (
  85. IN LPCWSTR servername,
  86. IN LPCWSTR queuename,
  87. IN LPCWSTR username,
  88. IN DWORD level,
  89. OUT LPBYTE *bufptr
  90. );
  91. NET_API_STATUS NET_API_FUNCTION
  92. NetCharDevQSetInfo (
  93. IN LPCWSTR servername,
  94. IN LPCWSTR queuename,
  95. IN DWORD level,
  96. IN LPBYTE buf,
  97. OUT LPDWORD parm_err
  98. );
  99. NET_API_STATUS NET_API_FUNCTION
  100. NetCharDevQPurge (
  101. IN LPCWSTR servername,
  102. IN LPCWSTR queuename
  103. );
  104. NET_API_STATUS NET_API_FUNCTION
  105. NetCharDevQPurgeSelf (
  106. IN LPCWSTR servername,
  107. IN LPCWSTR queuename,
  108. IN LPCWSTR computername
  109. );
  110. //
  111. // Data Structures - CharDevQ
  112. //
  113. typedef struct _CHARDEVQ_INFO_0 {
  114. LPWSTR cq0_dev;
  115. } CHARDEVQ_INFO_0, *PCHARDEVQ_INFO_0, *LPCHARDEVQ_INFO_0;
  116. typedef struct _CHARDEVQ_INFO_1 {
  117. LPWSTR cq1_dev;
  118. DWORD cq1_priority;
  119. LPWSTR cq1_devs;
  120. DWORD cq1_numusers;
  121. DWORD cq1_numahead;
  122. } CHARDEVQ_INFO_1, *PCHARDEVQ_INFO_1, *LPCHARDEVQ_INFO_1;
  123. typedef struct _CHARDEVQ_INFO_1002 {
  124. DWORD cq1002_priority;
  125. } CHARDEVQ_INFO_1002, *PCHARDEVQ_INFO_1002, *LPCHARDEVQ_INFO_1002;
  126. typedef struct _CHARDEVQ_INFO_1003 {
  127. LPWSTR cq1003_devs;
  128. } CHARDEVQ_INFO_1003, *PCHARDEVQ_INFO_1003, *LPCHARDEVQ_INFO_1003;
  129. //
  130. // Special Values and Constants
  131. //
  132. //
  133. // Bits for chardev_info_1 field ch1_status.
  134. //
  135. #define CHARDEV_STAT_OPENED 0x02
  136. #define CHARDEV_STAT_ERROR 0x04
  137. //
  138. // Opcodes for NetCharDevControl
  139. //
  140. #define CHARDEV_CLOSE 0
  141. //
  142. // Values for parm_err parameter.
  143. //
  144. #define CHARDEVQ_DEV_PARMNUM 1
  145. #define CHARDEVQ_PRIORITY_PARMNUM 2
  146. #define CHARDEVQ_DEVS_PARMNUM 3
  147. #define CHARDEVQ_NUMUSERS_PARMNUM 4
  148. #define CHARDEVQ_NUMAHEAD_PARMNUM 5
  149. //
  150. // Single-field infolevels for NetCharDevQSetInfo.
  151. //
  152. #define CHARDEVQ_PRIORITY_INFOLEVEL \
  153. (PARMNUM_BASE_INFOLEVEL + CHARDEVQ_PRIORITY_PARMNUM)
  154. #define CHARDEVQ_DEVS_INFOLEVEL \
  155. (PARMNUM_BASE_INFOLEVEL + CHARDEVQ_DEVS_PARMNUM)
  156. //
  157. // Minimum, maximum, and recommended default for priority.
  158. //
  159. #define CHARDEVQ_MAX_PRIORITY 1
  160. #define CHARDEVQ_MIN_PRIORITY 9
  161. #define CHARDEVQ_DEF_PRIORITY 5
  162. //
  163. // Value indicating no requests in the queue.
  164. //
  165. #define CHARDEVQ_NO_REQUESTS -1
  166. #endif // _LMCHDEV_
  167. //
  168. // Handle Class
  169. //
  170. #ifndef _LMHANDLE_
  171. #define _LMHANDLE_
  172. //
  173. // Function Prototypes
  174. //
  175. NET_API_STATUS NET_API_FUNCTION
  176. NetHandleGetInfo (
  177. IN HANDLE handle,
  178. IN DWORD level,
  179. OUT LPBYTE *bufptr
  180. );
  181. NET_API_STATUS NET_API_FUNCTION
  182. NetHandleSetInfo (
  183. IN HANDLE handle,
  184. IN DWORD level,
  185. IN LPBYTE buf,
  186. IN DWORD parmnum,
  187. OUT LPDWORD parmerr
  188. );
  189. //
  190. // Data Structures
  191. //
  192. typedef struct _HANDLE_INFO_1 {
  193. DWORD hdli1_chartime;
  194. DWORD hdli1_charcount;
  195. }HANDLE_INFO_1, *PHANDLE_INFO_1, *LPHANDLE_INFO_1;
  196. //
  197. // Special Values and Constants
  198. //
  199. //
  200. // Handle Get Info Levels
  201. //
  202. #define HANDLE_INFO_LEVEL_1 1
  203. //
  204. // Handle Set Info parm numbers
  205. //
  206. #define HANDLE_CHARTIME_PARMNUM 1
  207. #define HANDLE_CHARCOUNT_PARMNUM 2
  208. #ifdef __cplusplus
  209. }
  210. #endif
  211. #endif // _LMHANDLE_