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.

350 lines
6.6 KiB

  1. /*
  2. * These prototypes were lifted from ntos\inc\ntsrv.h
  3. *
  4. * They are here because ntsrv.h could not be included without
  5. * error in tdasync.c.
  6. *
  7. * If at a later date, ntsrv.h can be included without error,
  8. * this file and any references to it can be removed.
  9. *
  10. * Copyright (C) 1997-1999 Microsoft Corp.
  11. */
  12. #ifndef _ZWPROTOS_
  13. #define _ZWPROTOS_
  14. NTSYSAPI
  15. NTSTATUS
  16. NTAPI
  17. ZwOpenFile(
  18. OUT PHANDLE FileHandle,
  19. IN ACCESS_MASK DesiredAccess,
  20. IN POBJECT_ATTRIBUTES ObjectAttributes,
  21. OUT PIO_STATUS_BLOCK IoStatusBlock,
  22. IN ULONG ShareAccess,
  23. IN ULONG OpenOptions
  24. );
  25. NTSYSAPI
  26. NTSTATUS
  27. NTAPI
  28. ZwCreateEvent (
  29. OUT PHANDLE EventHandle,
  30. IN ACCESS_MASK DesiredAccess,
  31. IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
  32. IN EVENT_TYPE EventType,
  33. IN BOOLEAN InitialState
  34. );
  35. NTSYSAPI
  36. NTSTATUS
  37. NTAPI
  38. ZwCreateFile(
  39. OUT PHANDLE FileHandle,
  40. IN ACCESS_MASK DesiredAccess,
  41. IN POBJECT_ATTRIBUTES ObjectAttributes,
  42. OUT PIO_STATUS_BLOCK IoStatusBlock,
  43. IN PLARGE_INTEGER AllocationSize OPTIONAL,
  44. IN ULONG FileAttributes,
  45. IN ULONG ShareAccess,
  46. IN ULONG CreateDisposition,
  47. IN ULONG CreateOptions,
  48. IN PVOID EaBuffer OPTIONAL,
  49. IN ULONG EaLength
  50. );
  51. NTSYSAPI
  52. NTSTATUS
  53. NTAPI
  54. ZwDeviceIoControlFile(
  55. IN HANDLE FileHandle,
  56. IN HANDLE Event OPTIONAL,
  57. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  58. IN PVOID ApcContext OPTIONAL,
  59. OUT PIO_STATUS_BLOCK IoStatusBlock,
  60. IN ULONG IoControlCode,
  61. IN PVOID InputBuffer OPTIONAL,
  62. IN ULONG InputBufferLength,
  63. OUT PVOID OutputBuffer OPTIONAL,
  64. IN ULONG OutputBufferLength
  65. );
  66. NTSYSAPI
  67. NTSTATUS
  68. NTAPI
  69. ZwQueryInformationFile(
  70. IN HANDLE FileHandle,
  71. OUT PIO_STATUS_BLOCK IoStatusBlock,
  72. OUT PVOID FileInformation,
  73. IN ULONG Length,
  74. IN FILE_INFORMATION_CLASS FileInformationClass
  75. );
  76. NTSYSAPI
  77. NTSTATUS
  78. NTAPI
  79. ZwSetInformationFile(
  80. IN HANDLE FileHandle,
  81. OUT PIO_STATUS_BLOCK IoStatusBlock,
  82. IN PVOID FileInformation,
  83. IN ULONG Length,
  84. IN FILE_INFORMATION_CLASS FileInformationClass
  85. );
  86. NTSYSAPI
  87. NTSTATUS
  88. NTAPI
  89. ZwReadFile(
  90. IN HANDLE FileHandle,
  91. IN HANDLE Event OPTIONAL,
  92. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  93. IN PVOID ApcContext OPTIONAL,
  94. OUT PIO_STATUS_BLOCK IoStatusBlock,
  95. OUT PVOID Buffer,
  96. IN ULONG Length,
  97. IN PLARGE_INTEGER ByteOffset OPTIONAL,
  98. IN PULONG Key OPTIONAL
  99. );
  100. NTSYSAPI
  101. NTSTATUS
  102. NTAPI
  103. ZwWriteFile(
  104. IN HANDLE FileHandle,
  105. IN HANDLE Event OPTIONAL,
  106. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  107. IN PVOID ApcContext OPTIONAL,
  108. OUT PIO_STATUS_BLOCK IoStatusBlock,
  109. IN PVOID Buffer,
  110. IN ULONG Length,
  111. IN PLARGE_INTEGER ByteOffset OPTIONAL,
  112. IN PULONG Key OPTIONAL
  113. );
  114. NTSYSAPI
  115. NTSTATUS
  116. NTAPI
  117. ZwClose(
  118. IN HANDLE Handle
  119. );
  120. NTSYSAPI
  121. NTSTATUS
  122. NTAPI
  123. ZwCreateDirectoryObject(
  124. OUT PHANDLE DirectoryHandle,
  125. IN ACCESS_MASK DesiredAccess,
  126. IN POBJECT_ATTRIBUTES ObjectAttributes
  127. );
  128. NTSYSAPI
  129. NTSTATUS
  130. NTAPI
  131. ZwMakeTemporaryObject(
  132. IN HANDLE Handle
  133. );
  134. NTSYSAPI
  135. NTSTATUS
  136. NTAPI
  137. ZwCreateKey(
  138. OUT PHANDLE KeyHandle,
  139. IN ACCESS_MASK DesiredAccess,
  140. IN POBJECT_ATTRIBUTES ObjectAttributes,
  141. IN ULONG TitleIndex,
  142. IN PUNICODE_STRING Class OPTIONAL,
  143. IN ULONG CreateOptions,
  144. OUT PULONG Disposition OPTIONAL
  145. );
  146. NTSYSAPI
  147. NTSTATUS
  148. NTAPI
  149. ZwOpenKey(
  150. OUT PHANDLE KeyHandle,
  151. IN ACCESS_MASK DesiredAccess,
  152. IN POBJECT_ATTRIBUTES ObjectAttributes
  153. );
  154. NTSYSAPI
  155. NTSTATUS
  156. NTAPI
  157. ZwDeleteKey(
  158. IN HANDLE KeyHandle
  159. );
  160. NTSYSAPI
  161. NTSTATUS
  162. NTAPI
  163. ZwEnumerateKey(
  164. IN HANDLE KeyHandle,
  165. IN ULONG Index,
  166. IN KEY_INFORMATION_CLASS KeyInformationClass,
  167. OUT PVOID KeyInformation,
  168. IN ULONG Length,
  169. OUT PULONG ResultLength
  170. );
  171. NTSYSAPI
  172. NTSTATUS
  173. NTAPI
  174. ZwEnumerateValueKey(
  175. IN HANDLE KeyHandle,
  176. IN ULONG Index,
  177. IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
  178. OUT PVOID KeyValueInformation,
  179. IN ULONG Length,
  180. OUT PULONG ResultLength
  181. );
  182. NTSYSAPI
  183. NTSTATUS
  184. NTAPI
  185. ZwFlushKey(
  186. IN HANDLE KeyHandle
  187. );
  188. NTSYSAPI
  189. NTSTATUS
  190. NTAPI
  191. ZwQueryKey(
  192. IN HANDLE KeyHandle,
  193. IN KEY_INFORMATION_CLASS KeyInformationClass,
  194. OUT PVOID KeyInformation,
  195. IN ULONG Length,
  196. OUT PULONG ResultLength
  197. );
  198. NTSYSAPI
  199. NTSTATUS
  200. NTAPI
  201. ZwQueryValueKey(
  202. IN HANDLE KeyHandle,
  203. OUT PUNICODE_STRING ValueName,
  204. IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
  205. OUT PVOID KeyValueInformation,
  206. IN ULONG Length,
  207. OUT PULONG ResultLength
  208. );
  209. NTSYSAPI
  210. NTSTATUS
  211. NTAPI
  212. ZwSetValueKey(
  213. IN HANDLE KeyHandle,
  214. IN PUNICODE_STRING ValueName,
  215. IN ULONG TitleIndex OPTIONAL,
  216. IN ULONG Type,
  217. IN PVOID Data,
  218. IN ULONG DataSize
  219. );
  220. NTSYSAPI
  221. NTSTATUS
  222. NTAPI
  223. ZwOpenSection(
  224. OUT PHANDLE SectionHandle,
  225. IN ACCESS_MASK DesiredAccess,
  226. IN POBJECT_ATTRIBUTES ObjectAttributes
  227. );
  228. NTSYSAPI
  229. NTSTATUS
  230. NTAPI
  231. ZwMapViewOfSection(
  232. IN HANDLE SectionHandle,
  233. IN HANDLE ProcessHandle,
  234. IN OUT PVOID *BaseAddress,
  235. IN ULONG ZeroBits,
  236. IN ULONG CommitSize,
  237. IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
  238. IN OUT PSIZE_T ViewSize,
  239. IN SECTION_INHERIT InheritDisposition,
  240. IN ULONG AllocationType,
  241. IN ULONG Protect
  242. );
  243. NTSYSAPI
  244. NTSTATUS
  245. NTAPI
  246. ZwUnmapViewOfSection(
  247. IN HANDLE ProcessHandle,
  248. IN PVOID BaseAddress
  249. );
  250. NTSYSAPI
  251. NTSTATUS
  252. NTAPI
  253. ZwCreateSection (
  254. OUT PHANDLE SectionHandle,
  255. IN ACCESS_MASK DesiredAccess,
  256. IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
  257. IN PLARGE_INTEGER MaximumSize OPTIONAL,
  258. IN ULONG SectionPageProtection,
  259. IN ULONG AllocationAttributes,
  260. IN HANDLE FileHandle OPTIONAL
  261. );
  262. NTSYSAPI
  263. NTSTATUS
  264. NTAPI
  265. ZwSetInformationThread(
  266. IN HANDLE ThreadHandle,
  267. IN THREADINFOCLASS ThreadInformationClass,
  268. IN PVOID ThreadInformation,
  269. IN ULONG ThreadInformationLength
  270. );
  271. NTSYSAPI
  272. NTSTATUS
  273. NTAPI
  274. ZwAllocateVirtualMemory(
  275. IN HANDLE ProcessHandle,
  276. IN OUT PVOID *BaseAddress,
  277. IN ULONG ZeroBits,
  278. IN OUT PULONG RegionSize,
  279. IN ULONG AllocationType,
  280. IN ULONG Protect
  281. );
  282. NTSYSAPI
  283. NTSTATUS
  284. NTAPI
  285. ZwFreeVirtualMemory(
  286. IN HANDLE ProcessHandle,
  287. IN OUT PVOID *BaseAddress,
  288. IN OUT PULONG RegionSize,
  289. IN ULONG FreeType
  290. );
  291. NTSYSAPI
  292. NTSTATUS
  293. NTAPI
  294. ZwWaitForSingleObject(
  295. IN HANDLE Handle,
  296. IN BOOLEAN Alertable,
  297. IN PLARGE_INTEGER Timeout OPTIONAL
  298. );
  299. NTSYSAPI
  300. NTSTATUS
  301. NTAPI
  302. ZwSetEvent (
  303. IN HANDLE Handle,
  304. OUT PLONG PreviousState OPTIONAL
  305. );
  306. NTSYSAPI
  307. NTSTATUS
  308. NTAPI
  309. ZwDuplicateObject(
  310. IN HANDLE SourceProcessHandle,
  311. IN HANDLE SourceHandle,
  312. IN HANDLE TargetProcessHandle OPTIONAL,
  313. OUT PHANDLE TargetHandle OPTIONAL,
  314. IN ACCESS_MASK DesiredAccess,
  315. IN ULONG HandleAttributes,
  316. IN ULONG Options
  317. );
  318. #endif // _ZWPROTOS_