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.

270 lines
5.0 KiB

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