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.

1107 lines
23 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. vfzwapi.h
  5. Abstract:
  6. Zw interfaces verifier.
  7. Author:
  8. Silviu Calinoiu (silviuc) 23-Jul-2002
  9. Revision History:
  10. --*/
  11. #ifndef _VF_ZWAPI_
  12. #define _VF_ZWAPI_
  13. #define DECLARE_ZW_VERIFIER_THUNK(Name) #Name,(PDRIVER_VERIFIER_THUNK_ROUTINE)Vf##Name
  14. //NTSYSAPI
  15. NTSTATUS
  16. NTAPI
  17. VfZwAccessCheckAndAuditAlarm (
  18. IN PUNICODE_STRING SubsystemName,
  19. IN PVOID HandleId,
  20. IN PUNICODE_STRING ObjectTypeName,
  21. IN PUNICODE_STRING ObjectName,
  22. IN PSECURITY_DESCRIPTOR SecurityDescriptor,
  23. IN ACCESS_MASK DesiredAccess,
  24. IN PGENERIC_MAPPING GenericMapping,
  25. IN BOOLEAN ObjectCreation,
  26. OUT PACCESS_MASK GrantedAccess,
  27. OUT PNTSTATUS AccessStatus,
  28. OUT PBOOLEAN GenerateOnClose
  29. );
  30. //NTSYSAPI
  31. NTSTATUS
  32. NTAPI
  33. VfZwAddBootEntry (
  34. IN PBOOT_ENTRY BootEntry,
  35. OUT PULONG Id OPTIONAL
  36. );
  37. //NTSYSAPI
  38. NTSTATUS
  39. NTAPI
  40. VfZwAddDriverEntry (
  41. IN PEFI_DRIVER_ENTRY DriverEntry,
  42. OUT PULONG Id OPTIONAL
  43. );
  44. //NTSYSAPI
  45. NTSTATUS
  46. NTAPI
  47. VfZwAdjustPrivilegesToken (
  48. IN HANDLE TokenHandle,
  49. IN BOOLEAN DisableAllPrivileges,
  50. IN PTOKEN_PRIVILEGES NewState OPTIONAL,
  51. IN ULONG BufferLength OPTIONAL,
  52. OUT PTOKEN_PRIVILEGES PreviousState OPTIONAL,
  53. OUT PULONG ReturnLength
  54. );
  55. //NTSYSAPI
  56. NTSTATUS
  57. NTAPI
  58. VfZwAlertThread(
  59. IN HANDLE ThreadHandle
  60. );
  61. //NTSYSAPI
  62. NTSTATUS
  63. NTAPI
  64. VfZwAllocateVirtualMemory(
  65. IN HANDLE ProcessHandle,
  66. IN OUT PVOID *BaseAddress,
  67. IN ULONG_PTR ZeroBits,
  68. IN OUT PSIZE_T RegionSize,
  69. IN ULONG AllocationType,
  70. IN ULONG Protect
  71. );
  72. //NTSYSAPI
  73. NTSTATUS
  74. NTAPI
  75. VfZwAssignProcessToJobObject(
  76. IN HANDLE JobHandle,
  77. IN HANDLE ProcessHandle
  78. );
  79. //NTSYSAPI
  80. NTSTATUS
  81. NTAPI
  82. VfZwCancelIoFile(
  83. IN HANDLE FileHandle,
  84. OUT PIO_STATUS_BLOCK IoStatusBlock
  85. );
  86. //NTSYSAPI
  87. NTSTATUS
  88. NTAPI
  89. VfZwCancelTimer (
  90. IN HANDLE TimerHandle,
  91. OUT PBOOLEAN CurrentState OPTIONAL
  92. );
  93. //NTSYSAPI
  94. NTSTATUS
  95. NTAPI
  96. VfZwClearEvent (
  97. IN HANDLE EventHandle
  98. );
  99. //NTSYSAPI
  100. NTSTATUS
  101. NTAPI
  102. VfZwClose(
  103. IN HANDLE Handle
  104. );
  105. //NTSYSAPI
  106. NTSTATUS
  107. NTAPI
  108. VfZwCloseObjectAuditAlarm (
  109. IN PUNICODE_STRING SubsystemName,
  110. IN PVOID HandleId,
  111. IN BOOLEAN GenerateOnClose
  112. );
  113. //NTSYSAPI
  114. NTSTATUS
  115. NTAPI
  116. VfZwConnectPort(
  117. OUT PHANDLE PortHandle,
  118. IN PUNICODE_STRING PortName,
  119. IN PSECURITY_QUALITY_OF_SERVICE SecurityQos,
  120. IN OUT PPORT_VIEW ClientView OPTIONAL,
  121. IN OUT PREMOTE_PORT_VIEW ServerView OPTIONAL,
  122. OUT PULONG MaxMessageLength OPTIONAL,
  123. IN OUT PVOID ConnectionInformation OPTIONAL,
  124. IN OUT PULONG ConnectionInformationLength OPTIONAL
  125. );
  126. //NTSYSAPI
  127. NTSTATUS
  128. NTAPI
  129. VfZwCreateDirectoryObject(
  130. OUT PHANDLE DirectoryHandle,
  131. IN ACCESS_MASK DesiredAccess,
  132. IN POBJECT_ATTRIBUTES ObjectAttributes
  133. );
  134. //NTSYSAPI
  135. NTSTATUS
  136. NTAPI
  137. VfZwCreateEvent (
  138. OUT PHANDLE EventHandle,
  139. IN ACCESS_MASK DesiredAccess,
  140. IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
  141. IN EVENT_TYPE EventType,
  142. IN BOOLEAN InitialState
  143. );
  144. //NTSYSAPI
  145. NTSTATUS
  146. NTAPI
  147. VfZwCreateFile(
  148. OUT PHANDLE FileHandle,
  149. IN ACCESS_MASK DesiredAccess,
  150. IN POBJECT_ATTRIBUTES ObjectAttributes,
  151. OUT PIO_STATUS_BLOCK IoStatusBlock,
  152. IN PLARGE_INTEGER AllocationSize OPTIONAL,
  153. IN ULONG FileAttributes,
  154. IN ULONG ShareAccess,
  155. IN ULONG CreateDisposition,
  156. IN ULONG CreateOptions,
  157. IN PVOID EaBuffer OPTIONAL,
  158. IN ULONG EaLength
  159. );
  160. //NTSYSAPI
  161. NTSTATUS
  162. NTAPI
  163. VfZwCreateJobObject (
  164. OUT PHANDLE JobHandle,
  165. IN ACCESS_MASK DesiredAccess,
  166. IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL
  167. );
  168. //NTSYSAPI
  169. NTSTATUS
  170. NTAPI
  171. VfZwCreateKey(
  172. OUT PHANDLE KeyHandle,
  173. IN ACCESS_MASK DesiredAccess,
  174. IN POBJECT_ATTRIBUTES ObjectAttributes,
  175. IN ULONG TitleIndex,
  176. IN PUNICODE_STRING Class OPTIONAL,
  177. IN ULONG CreateOptions,
  178. OUT PULONG Disposition OPTIONAL
  179. );
  180. //NTSYSAPI
  181. NTSTATUS
  182. NTAPI
  183. VfZwCreateSection (
  184. OUT PHANDLE SectionHandle,
  185. IN ACCESS_MASK DesiredAccess,
  186. IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
  187. IN PLARGE_INTEGER MaximumSize OPTIONAL,
  188. IN ULONG SectionPageProtection,
  189. IN ULONG AllocationAttributes,
  190. IN HANDLE FileHandle OPTIONAL
  191. );
  192. //NTSYSAPI
  193. NTSTATUS
  194. NTAPI
  195. VfZwCreateSymbolicLinkObject(
  196. OUT PHANDLE LinkHandle,
  197. IN ACCESS_MASK DesiredAccess,
  198. IN POBJECT_ATTRIBUTES ObjectAttributes,
  199. IN PUNICODE_STRING LinkTarget
  200. );
  201. //NTSYSAPI
  202. NTSTATUS
  203. NTAPI
  204. VfZwCreateTimer (
  205. OUT PHANDLE TimerHandle,
  206. IN ACCESS_MASK DesiredAccess,
  207. IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
  208. IN TIMER_TYPE TimerType
  209. );
  210. //NTSYSAPI
  211. NTSTATUS
  212. NTAPI
  213. VfZwDeleteBootEntry (
  214. IN ULONG Id
  215. );
  216. //NTSYSAPI
  217. NTSTATUS
  218. NTAPI
  219. VfZwDeleteDriverEntry (
  220. IN ULONG Id
  221. );
  222. //NTSYSAPI
  223. NTSTATUS
  224. NTAPI
  225. VfZwDeleteFile(
  226. IN POBJECT_ATTRIBUTES ObjectAttributes
  227. );
  228. //NTSYSAPI
  229. NTSTATUS
  230. NTAPI
  231. VfZwDeleteKey(
  232. IN HANDLE KeyHandle
  233. );
  234. //NTSYSAPI
  235. NTSTATUS
  236. NTAPI
  237. VfZwDeleteValueKey(
  238. IN HANDLE KeyHandle,
  239. IN PUNICODE_STRING ValueName
  240. );
  241. //NTSYSAPI
  242. NTSTATUS
  243. NTAPI
  244. VfZwDeviceIoControlFile(
  245. IN HANDLE FileHandle,
  246. IN HANDLE Event OPTIONAL,
  247. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  248. IN PVOID ApcContext OPTIONAL,
  249. OUT PIO_STATUS_BLOCK IoStatusBlock,
  250. IN ULONG IoControlCode,
  251. IN PVOID InputBuffer OPTIONAL,
  252. IN ULONG InputBufferLength,
  253. OUT PVOID OutputBuffer OPTIONAL,
  254. IN ULONG OutputBufferLength
  255. );
  256. //NTSYSAPI
  257. NTSTATUS
  258. NTAPI
  259. VfZwDisplayString(
  260. IN PUNICODE_STRING String
  261. );
  262. //NTSYSAPI
  263. NTSTATUS
  264. NTAPI
  265. VfZwDuplicateObject(
  266. IN HANDLE SourceProcessHandle,
  267. IN HANDLE SourceHandle,
  268. IN HANDLE TargetProcessHandle OPTIONAL,
  269. OUT PHANDLE TargetHandle OPTIONAL,
  270. IN ACCESS_MASK DesiredAccess,
  271. IN ULONG HandleAttributes,
  272. IN ULONG Options
  273. );
  274. //NTSYSAPI
  275. NTSTATUS
  276. NTAPI
  277. VfZwDuplicateToken(
  278. IN HANDLE ExistingTokenHandle,
  279. IN ACCESS_MASK DesiredAccess,
  280. IN POBJECT_ATTRIBUTES ObjectAttributes,
  281. IN BOOLEAN EffectiveOnly,
  282. IN TOKEN_TYPE TokenType,
  283. OUT PHANDLE NewTokenHandle
  284. );
  285. //NTSYSAPI
  286. NTSTATUS
  287. NTAPI
  288. VfZwEnumerateBootEntries (
  289. OUT PVOID Buffer,
  290. IN OUT PULONG BufferLength
  291. );
  292. //NTSYSAPI
  293. NTSTATUS
  294. NTAPI
  295. VfZwEnumerateDriverEntries (
  296. OUT PVOID Buffer,
  297. IN OUT PULONG BufferLength
  298. );
  299. //NTSYSAPI
  300. NTSTATUS
  301. NTAPI
  302. VfZwEnumerateKey(
  303. IN HANDLE KeyHandle,
  304. IN ULONG Index,
  305. IN KEY_INFORMATION_CLASS KeyInformationClass,
  306. OUT PVOID KeyInformation,
  307. IN ULONG Length,
  308. OUT PULONG ResultLength
  309. );
  310. //NTSYSAPI
  311. NTSTATUS
  312. NTAPI
  313. VfZwEnumerateValueKey(
  314. IN HANDLE KeyHandle,
  315. IN ULONG Index,
  316. IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
  317. OUT PVOID KeyValueInformation,
  318. IN ULONG Length,
  319. OUT PULONG ResultLength
  320. );
  321. //NTSYSAPI
  322. NTSTATUS
  323. NTAPI
  324. VfZwFlushInstructionCache (
  325. IN HANDLE ProcessHandle,
  326. IN PVOID BaseAddress OPTIONAL,
  327. IN SIZE_T Length
  328. );
  329. //NTSYSAPI
  330. NTSTATUS
  331. NTAPI
  332. VfZwFlushKey(
  333. IN HANDLE KeyHandle
  334. );
  335. //NTSYSAPI
  336. NTSTATUS
  337. NTAPI
  338. VfZwFlushVirtualMemory(
  339. IN HANDLE ProcessHandle,
  340. IN OUT PVOID *BaseAddress,
  341. IN OUT PSIZE_T RegionSize,
  342. OUT PIO_STATUS_BLOCK IoStatus
  343. );
  344. //NTSYSAPI
  345. NTSTATUS
  346. NTAPI
  347. VfZwFreeVirtualMemory(
  348. IN HANDLE ProcessHandle,
  349. IN OUT PVOID *BaseAddress,
  350. IN OUT PSIZE_T RegionSize,
  351. IN ULONG FreeType
  352. );
  353. //NTSYSAPI
  354. NTSTATUS
  355. NTAPI
  356. VfZwFsControlFile(
  357. IN HANDLE FileHandle,
  358. IN HANDLE Event OPTIONAL,
  359. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  360. IN PVOID ApcContext OPTIONAL,
  361. OUT PIO_STATUS_BLOCK IoStatusBlock,
  362. IN ULONG FsControlCode,
  363. IN PVOID InputBuffer OPTIONAL,
  364. IN ULONG InputBufferLength,
  365. OUT PVOID OutputBuffer OPTIONAL,
  366. IN ULONG OutputBufferLength
  367. );
  368. //NTSYSAPI
  369. NTSTATUS
  370. NTAPI
  371. VfZwInitiatePowerAction(
  372. IN POWER_ACTION SystemAction,
  373. IN SYSTEM_POWER_STATE MinSystemState,
  374. IN ULONG Flags, // POWER_ACTION_xxx flags
  375. IN BOOLEAN Asynchronous
  376. );
  377. //NTSYSAPI
  378. NTSTATUS
  379. NTAPI
  380. VfZwIsProcessInJob (
  381. IN HANDLE ProcessHandle,
  382. IN HANDLE JobHandle
  383. );
  384. //NTSYSAPI
  385. NTSTATUS
  386. NTAPI
  387. VfZwLoadDriver(
  388. IN PUNICODE_STRING DriverServiceName
  389. );
  390. //NTSYSAPI
  391. NTSTATUS
  392. NTAPI
  393. VfZwLoadKey(
  394. IN POBJECT_ATTRIBUTES TargetKey,
  395. IN POBJECT_ATTRIBUTES SourceFile
  396. );
  397. //NTSYSAPI
  398. NTSTATUS
  399. NTAPI
  400. VfZwMakeTemporaryObject(
  401. IN HANDLE Handle
  402. );
  403. //NTSYSAPI
  404. NTSTATUS
  405. NTAPI
  406. VfZwMapViewOfSection(
  407. IN HANDLE SectionHandle,
  408. IN HANDLE ProcessHandle,
  409. IN OUT PVOID *BaseAddress,
  410. IN ULONG_PTR ZeroBits,
  411. IN SIZE_T CommitSize,
  412. IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
  413. IN OUT PSIZE_T ViewSize,
  414. IN SECTION_INHERIT InheritDisposition,
  415. IN ULONG AllocationType,
  416. IN ULONG Protect
  417. );
  418. //NTSYSAPI
  419. NTSTATUS
  420. NTAPI
  421. VfZwModifyBootEntry (
  422. IN PBOOT_ENTRY BootEntry
  423. );
  424. //NTSYSAPI
  425. NTSTATUS
  426. NTAPI
  427. VfZwModifyDriverEntry (
  428. IN PEFI_DRIVER_ENTRY DriverEntry
  429. );
  430. //NTSYSAPI
  431. NTSTATUS
  432. NTAPI
  433. VfZwNotifyChangeKey(
  434. IN HANDLE KeyHandle,
  435. IN HANDLE Event OPTIONAL,
  436. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  437. IN PVOID ApcContext OPTIONAL,
  438. OUT PIO_STATUS_BLOCK IoStatusBlock,
  439. IN ULONG CompletionFilter,
  440. IN BOOLEAN WatchTree,
  441. OUT PVOID Buffer,
  442. IN ULONG BufferSize,
  443. IN BOOLEAN Asynchronous
  444. );
  445. //NTSYSAPI
  446. NTSTATUS
  447. NTAPI
  448. VfZwOpenDirectoryObject(
  449. OUT PHANDLE DirectoryHandle,
  450. IN ACCESS_MASK DesiredAccess,
  451. IN POBJECT_ATTRIBUTES ObjectAttributes
  452. );
  453. //NTSYSAPI
  454. NTSTATUS
  455. NTAPI
  456. VfZwOpenEvent (
  457. OUT PHANDLE EventHandle,
  458. IN ACCESS_MASK DesiredAccess,
  459. IN POBJECT_ATTRIBUTES ObjectAttributes
  460. );
  461. //NTSYSAPI
  462. NTSTATUS
  463. NTAPI
  464. VfZwOpenFile(
  465. OUT PHANDLE FileHandle,
  466. IN ACCESS_MASK DesiredAccess,
  467. IN POBJECT_ATTRIBUTES ObjectAttributes,
  468. OUT PIO_STATUS_BLOCK IoStatusBlock,
  469. IN ULONG ShareAccess,
  470. IN ULONG OpenOptions
  471. );
  472. //NTSYSAPI
  473. NTSTATUS
  474. NTAPI
  475. VfZwOpenJobObject(
  476. OUT PHANDLE JobHandle,
  477. IN ACCESS_MASK DesiredAccess,
  478. IN POBJECT_ATTRIBUTES ObjectAttributes
  479. );
  480. //NTSYSAPI
  481. NTSTATUS
  482. NTAPI
  483. VfZwOpenKey(
  484. OUT PHANDLE KeyHandle,
  485. IN ACCESS_MASK DesiredAccess,
  486. IN POBJECT_ATTRIBUTES ObjectAttributes
  487. );
  488. //NTSYSAPI
  489. NTSTATUS
  490. NTAPI
  491. VfZwOpenProcess (
  492. OUT PHANDLE ProcessHandle,
  493. IN ACCESS_MASK DesiredAccess,
  494. IN POBJECT_ATTRIBUTES ObjectAttributes,
  495. IN PCLIENT_ID ClientId OPTIONAL
  496. );
  497. //NTSYSAPI
  498. NTSTATUS
  499. NTAPI
  500. VfZwOpenProcessToken(
  501. IN HANDLE ProcessHandle,
  502. IN ACCESS_MASK DesiredAccess,
  503. OUT PHANDLE TokenHandle
  504. );
  505. //NTSYSAPI
  506. NTSTATUS
  507. NTAPI
  508. VfZwOpenProcessTokenEx(
  509. IN HANDLE ProcessHandle,
  510. IN ACCESS_MASK DesiredAccess,
  511. IN ULONG HandleAttributes,
  512. OUT PHANDLE TokenHandle
  513. );
  514. //NTSYSAPI
  515. NTSTATUS
  516. NTAPI
  517. VfZwOpenSection(
  518. OUT PHANDLE SectionHandle,
  519. IN ACCESS_MASK DesiredAccess,
  520. IN POBJECT_ATTRIBUTES ObjectAttributes
  521. );
  522. //NTSYSAPI
  523. NTSTATUS
  524. NTAPI
  525. VfZwOpenSymbolicLinkObject(
  526. OUT PHANDLE LinkHandle,
  527. IN ACCESS_MASK DesiredAccess,
  528. IN POBJECT_ATTRIBUTES ObjectAttributes
  529. );
  530. //NTSYSAPI
  531. NTSTATUS
  532. NTAPI
  533. VfZwOpenThread (
  534. OUT PHANDLE ThreadHandle,
  535. IN ACCESS_MASK DesiredAccess,
  536. IN POBJECT_ATTRIBUTES ObjectAttributes,
  537. IN PCLIENT_ID ClientId OPTIONAL
  538. );
  539. //NTSYSAPI
  540. NTSTATUS
  541. NTAPI
  542. VfZwOpenThreadToken(
  543. IN HANDLE ThreadHandle,
  544. IN ACCESS_MASK DesiredAccess,
  545. IN BOOLEAN OpenAsSelf,
  546. OUT PHANDLE TokenHandle
  547. );
  548. //NTSYSAPI
  549. NTSTATUS
  550. NTAPI
  551. VfZwOpenThreadTokenEx(
  552. IN HANDLE ThreadHandle,
  553. IN ACCESS_MASK DesiredAccess,
  554. IN BOOLEAN OpenAsSelf,
  555. IN ULONG HandleAttributes,
  556. OUT PHANDLE TokenHandle
  557. );
  558. //NTSYSAPI
  559. NTSTATUS
  560. NTAPI
  561. VfZwOpenTimer (
  562. OUT PHANDLE TimerHandle,
  563. IN ACCESS_MASK DesiredAccess,
  564. IN POBJECT_ATTRIBUTES ObjectAttributes
  565. );
  566. //NTSYSAPI
  567. NTSTATUS
  568. NTAPI
  569. VfZwPowerInformation(
  570. IN POWER_INFORMATION_LEVEL InformationLevel,
  571. IN PVOID InputBuffer OPTIONAL,
  572. IN ULONG InputBufferLength,
  573. OUT PVOID OutputBuffer OPTIONAL,
  574. IN ULONG OutputBufferLength
  575. );
  576. //NTSYSAPI
  577. NTSTATUS
  578. NTAPI
  579. VfZwPulseEvent (
  580. IN HANDLE EventHandle,
  581. OUT PLONG PreviousState OPTIONAL
  582. );
  583. //NTSYSAPI
  584. NTSTATUS
  585. NTAPI
  586. VfZwQueryBootEntryOrder (
  587. OUT PULONG Ids,
  588. IN OUT PULONG Count
  589. );
  590. //NTSYSAPI
  591. NTSTATUS
  592. NTAPI
  593. VfZwQueryBootOptions (
  594. OUT PBOOT_OPTIONS BootOptions,
  595. IN OUT PULONG BootOptionsLength
  596. );
  597. //NTSYSAPI
  598. NTSTATUS
  599. NTAPI
  600. VfZwQueryDefaultLocale(
  601. IN BOOLEAN UserProfile,
  602. OUT PLCID DefaultLocaleId
  603. );
  604. //NTSYSAPI
  605. NTSTATUS
  606. NTAPI
  607. VfZwQueryDefaultUILanguage(
  608. OUT LANGID *DefaultUILanguageId
  609. );
  610. //NTSYSAPI
  611. NTSTATUS
  612. NTAPI
  613. VfZwQueryDirectoryFile(
  614. IN HANDLE FileHandle,
  615. IN HANDLE Event OPTIONAL,
  616. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  617. IN PVOID ApcContext OPTIONAL,
  618. OUT PIO_STATUS_BLOCK IoStatusBlock,
  619. OUT PVOID FileInformation,
  620. IN ULONG Length,
  621. IN FILE_INFORMATION_CLASS FileInformationClass,
  622. IN BOOLEAN ReturnSingleEntry,
  623. IN PUNICODE_STRING FileName OPTIONAL,
  624. IN BOOLEAN RestartScan
  625. );
  626. //NTSYSAPI
  627. NTSTATUS
  628. NTAPI
  629. VfZwQueryDirectoryObject(
  630. IN HANDLE DirectoryHandle,
  631. OUT PVOID Buffer,
  632. IN ULONG Length,
  633. IN BOOLEAN ReturnSingleEntry,
  634. IN BOOLEAN RestartScan,
  635. IN OUT PULONG Context,
  636. OUT PULONG ReturnLength OPTIONAL
  637. );
  638. //NTSYSAPI
  639. NTSTATUS
  640. NTAPI
  641. VfZwQueryDriverEntryOrder (
  642. OUT PULONG Ids,
  643. IN OUT PULONG Count
  644. );
  645. //NTSYSAPI
  646. NTSTATUS
  647. NTAPI
  648. VfZwQueryEaFile(
  649. IN HANDLE FileHandle,
  650. OUT PIO_STATUS_BLOCK IoStatusBlock,
  651. OUT PVOID Buffer,
  652. IN ULONG Length,
  653. IN BOOLEAN ReturnSingleEntry,
  654. IN PVOID EaList OPTIONAL,
  655. IN ULONG EaListLength,
  656. IN PULONG EaIndex OPTIONAL,
  657. IN BOOLEAN RestartScan
  658. );
  659. //NTSYSAPI
  660. NTSTATUS
  661. NTAPI
  662. VfZwQueryFullAttributesFile(
  663. IN POBJECT_ATTRIBUTES ObjectAttributes,
  664. OUT PFILE_NETWORK_OPEN_INFORMATION FileInformation
  665. );
  666. //NTSYSAPI
  667. NTSTATUS
  668. NTAPI
  669. VfZwQueryInformationFile(
  670. IN HANDLE FileHandle,
  671. OUT PIO_STATUS_BLOCK IoStatusBlock,
  672. OUT PVOID FileInformation,
  673. IN ULONG Length,
  674. IN FILE_INFORMATION_CLASS FileInformationClass
  675. );
  676. //NTSYSAPI
  677. NTSTATUS
  678. NTAPI
  679. VfZwQueryInformationJobObject(
  680. IN HANDLE JobHandle,
  681. IN JOBOBJECTINFOCLASS JobObjectInformationClass,
  682. OUT PVOID JobObjectInformation,
  683. IN ULONG JobObjectInformationLength,
  684. OUT PULONG ReturnLength OPTIONAL
  685. );
  686. //NTSYSAPI
  687. NTSTATUS
  688. NTAPI
  689. VfZwQueryInformationProcess(
  690. IN HANDLE ProcessHandle,
  691. IN PROCESSINFOCLASS ProcessInformationClass,
  692. OUT PVOID ProcessInformation,
  693. IN ULONG ProcessInformationLength,
  694. OUT PULONG ReturnLength OPTIONAL
  695. );
  696. //NTSYSAPI
  697. NTSTATUS
  698. NTAPI
  699. VfZwQueryInformationThread(
  700. IN HANDLE ThreadHandle,
  701. IN THREADINFOCLASS ThreadInformationClass,
  702. OUT PVOID ThreadInformation,
  703. IN ULONG ThreadInformationLength,
  704. OUT PULONG ReturnLength OPTIONAL
  705. );
  706. //NTSYSAPI
  707. NTSTATUS
  708. NTAPI
  709. VfZwQueryInformationToken (
  710. IN HANDLE TokenHandle,
  711. IN TOKEN_INFORMATION_CLASS TokenInformationClass,
  712. OUT PVOID TokenInformation,
  713. IN ULONG TokenInformationLength,
  714. OUT PULONG ReturnLength
  715. );
  716. //NTSYSAPI
  717. NTSTATUS
  718. NTAPI
  719. VfZwQueryInstallUILanguage(
  720. OUT LANGID *InstallUILanguageId
  721. );
  722. //NTSYSAPI
  723. NTSTATUS
  724. NTAPI
  725. VfZwQueryKey(
  726. IN HANDLE KeyHandle,
  727. IN KEY_INFORMATION_CLASS KeyInformationClass,
  728. OUT PVOID KeyInformation,
  729. IN ULONG Length,
  730. OUT PULONG ResultLength
  731. );
  732. //NTSYSAPI
  733. NTSTATUS
  734. NTAPI
  735. VfZwQueryObject(
  736. IN HANDLE Handle,
  737. IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
  738. OUT PVOID ObjectInformation,
  739. IN ULONG Length,
  740. OUT PULONG ReturnLength OPTIONAL
  741. );
  742. //NTSYSAPI
  743. NTSTATUS
  744. NTAPI
  745. VfZwQuerySection(
  746. IN HANDLE SectionHandle,
  747. IN SECTION_INFORMATION_CLASS SectionInformationClass,
  748. OUT PVOID SectionInformation,
  749. IN SIZE_T SectionInformationLength,
  750. OUT PSIZE_T ReturnLength OPTIONAL
  751. );
  752. //NTSYSAPI
  753. NTSTATUS
  754. NTAPI
  755. VfZwQuerySecurityObject(
  756. IN HANDLE Handle,
  757. IN SECURITY_INFORMATION SecurityInformation,
  758. OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
  759. IN ULONG Length,
  760. OUT PULONG LengthNeeded
  761. );
  762. //NTSYSAPI
  763. NTSTATUS
  764. NTAPI
  765. VfZwQuerySymbolicLinkObject(
  766. IN HANDLE LinkHandle,
  767. IN OUT PUNICODE_STRING LinkTarget,
  768. OUT PULONG ReturnedLength OPTIONAL
  769. );
  770. //NTSYSAPI
  771. NTSTATUS
  772. NTAPI
  773. VfZwQuerySystemInformation (
  774. IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
  775. OUT PVOID SystemInformation,
  776. IN ULONG SystemInformationLength,
  777. OUT PULONG ReturnLength OPTIONAL
  778. );
  779. //NTSYSAPI
  780. NTSTATUS
  781. NTAPI
  782. VfZwQueryValueKey(
  783. IN HANDLE KeyHandle,
  784. IN PUNICODE_STRING ValueName,
  785. IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
  786. OUT PVOID KeyValueInformation,
  787. IN ULONG Length,
  788. OUT PULONG ResultLength
  789. );
  790. //NTSYSAPI
  791. NTSTATUS
  792. NTAPI
  793. VfZwQueryVolumeInformationFile(
  794. IN HANDLE FileHandle,
  795. OUT PIO_STATUS_BLOCK IoStatusBlock,
  796. OUT PVOID FsInformation,
  797. IN ULONG Length,
  798. IN FS_INFORMATION_CLASS FsInformationClass
  799. );
  800. //NTSYSAPI
  801. NTSTATUS
  802. NTAPI
  803. VfZwReadFile(
  804. IN HANDLE FileHandle,
  805. IN HANDLE Event OPTIONAL,
  806. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  807. IN PVOID ApcContext OPTIONAL,
  808. OUT PIO_STATUS_BLOCK IoStatusBlock,
  809. OUT PVOID Buffer,
  810. IN ULONG Length,
  811. IN PLARGE_INTEGER ByteOffset OPTIONAL,
  812. IN PULONG Key OPTIONAL
  813. );
  814. //NTSYSAPI
  815. NTSTATUS
  816. NTAPI
  817. VfZwReplaceKey(
  818. IN POBJECT_ATTRIBUTES NewFile,
  819. IN HANDLE TargetHandle,
  820. IN POBJECT_ATTRIBUTES OldFile
  821. );
  822. //NTSYSAPI
  823. NTSTATUS
  824. NTAPI
  825. VfZwRequestWaitReplyPort(
  826. IN HANDLE PortHandle,
  827. IN PPORT_MESSAGE RequestMessage,
  828. OUT PPORT_MESSAGE ReplyMessage
  829. );
  830. //NTSYSAPI
  831. NTSTATUS
  832. NTAPI
  833. VfZwResetEvent (
  834. IN HANDLE EventHandle,
  835. OUT PLONG PreviousState OPTIONAL
  836. );
  837. //NTSYSAPI
  838. NTSTATUS
  839. NTAPI
  840. VfZwRestoreKey(
  841. IN HANDLE KeyHandle,
  842. IN HANDLE FileHandle,
  843. IN ULONG Flags
  844. );
  845. //NTSYSAPI
  846. NTSTATUS
  847. NTAPI
  848. VfZwSaveKey(
  849. IN HANDLE KeyHandle,
  850. IN HANDLE FileHandle
  851. );
  852. //NTSYSAPI
  853. NTSTATUS
  854. NTAPI
  855. VfZwSaveKeyEx(
  856. IN HANDLE KeyHandle,
  857. IN HANDLE FileHandle,
  858. IN ULONG Format
  859. );
  860. //NTSYSAPI
  861. NTSTATUS
  862. NTAPI
  863. VfZwSetBootEntryOrder (
  864. IN PULONG Ids,
  865. IN ULONG Count
  866. );
  867. //NTSYSAPI
  868. NTSTATUS
  869. NTAPI
  870. VfZwSetBootOptions (
  871. IN PBOOT_OPTIONS BootOptions,
  872. IN ULONG FieldsToChange
  873. );
  874. //NTSYSAPI
  875. NTSTATUS
  876. NTAPI
  877. VfZwSetDefaultLocale(
  878. IN BOOLEAN UserProfile,
  879. IN LCID DefaultLocaleId
  880. );
  881. //NTSYSAPI
  882. NTSTATUS
  883. NTAPI
  884. VfZwSetDefaultUILanguage(
  885. IN LANGID DefaultUILanguageId
  886. );
  887. //NTSYSAPI
  888. NTSTATUS
  889. NTAPI
  890. VfZwSetDriverEntryOrder (
  891. IN PULONG Ids,
  892. IN ULONG Count
  893. );
  894. //NTSYSAPI
  895. NTSTATUS
  896. NTAPI
  897. VfZwSetEaFile(
  898. IN HANDLE FileHandle,
  899. OUT PIO_STATUS_BLOCK IoStatusBlock,
  900. IN PVOID Buffer,
  901. IN ULONG Length
  902. );
  903. //NTSYSAPI
  904. NTSTATUS
  905. NTAPI
  906. VfZwSetEvent (
  907. IN HANDLE EventHandle,
  908. OUT PLONG PreviousState OPTIONAL
  909. );
  910. //NTSYSAPI
  911. NTSTATUS
  912. NTAPI
  913. VfZwSetInformationFile(
  914. IN HANDLE FileHandle,
  915. OUT PIO_STATUS_BLOCK IoStatusBlock,
  916. IN PVOID FileInformation,
  917. IN ULONG Length,
  918. IN FILE_INFORMATION_CLASS FileInformationClass
  919. );
  920. //NTSYSAPI
  921. NTSTATUS
  922. NTAPI
  923. VfZwSetInformationJobObject(
  924. IN HANDLE JobHandle,
  925. IN JOBOBJECTINFOCLASS JobObjectInformationClass,
  926. IN PVOID JobObjectInformation,
  927. IN ULONG JobObjectInformationLength
  928. );
  929. //NTSYSAPI
  930. NTSTATUS
  931. NTAPI
  932. VfZwSetInformationObject(
  933. IN HANDLE Handle,
  934. IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
  935. IN PVOID ObjectInformation,
  936. IN ULONG ObjectInformationLength
  937. );
  938. //NTSYSAPI
  939. NTSTATUS
  940. NTAPI
  941. VfZwSetInformationProcess(
  942. IN HANDLE ProcessHandle,
  943. IN PROCESSINFOCLASS ProcessInformationClass,
  944. IN PVOID ProcessInformation,
  945. IN ULONG ProcessInformationLength
  946. );
  947. //NTSYSAPI
  948. NTSTATUS
  949. NTAPI
  950. VfZwSetInformationThread(
  951. IN HANDLE ThreadHandle,
  952. IN THREADINFOCLASS ThreadInformationClass,
  953. IN PVOID ThreadInformation,
  954. IN ULONG ThreadInformationLength
  955. );
  956. //NTSYSAPI
  957. NTSTATUS
  958. NTAPI
  959. VfZwSetSecurityObject(
  960. IN HANDLE Handle,
  961. IN SECURITY_INFORMATION SecurityInformation,
  962. IN PSECURITY_DESCRIPTOR SecurityDescriptor
  963. );
  964. //NTSYSAPI
  965. NTSTATUS
  966. NTAPI
  967. VfZwSetSystemInformation (
  968. IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
  969. IN PVOID SystemInformation,
  970. IN ULONG SystemInformationLength
  971. );
  972. //NTSYSAPI
  973. NTSTATUS
  974. NTAPI
  975. VfZwSetSystemTime (
  976. IN PLARGE_INTEGER SystemTime,
  977. OUT PLARGE_INTEGER PreviousTime OPTIONAL
  978. );
  979. //NTSYSAPI
  980. NTSTATUS
  981. NTAPI
  982. VfZwSetTimer (
  983. IN HANDLE TimerHandle,
  984. IN PLARGE_INTEGER DueTime,
  985. IN PTIMER_APC_ROUTINE TimerApcRoutine OPTIONAL,
  986. IN PVOID TimerContext OPTIONAL,
  987. IN BOOLEAN ResumeTimer,
  988. IN LONG Period OPTIONAL,
  989. OUT PBOOLEAN PreviousState OPTIONAL
  990. );
  991. //NTSYSAPI
  992. NTSTATUS
  993. NTAPI
  994. VfZwSetValueKey(
  995. IN HANDLE KeyHandle,
  996. IN PUNICODE_STRING ValueName,
  997. IN ULONG TitleIndex OPTIONAL,
  998. IN ULONG Type,
  999. IN PVOID Data,
  1000. IN ULONG DataSize
  1001. );
  1002. //NTSYSAPI
  1003. NTSTATUS
  1004. NTAPI
  1005. VfZwSetVolumeInformationFile(
  1006. IN HANDLE FileHandle,
  1007. OUT PIO_STATUS_BLOCK IoStatusBlock,
  1008. IN PVOID FsInformation,
  1009. IN ULONG Length,
  1010. IN FS_INFORMATION_CLASS FsInformationClass
  1011. );
  1012. //NTSYSAPI
  1013. NTSTATUS
  1014. NTAPI
  1015. VfZwTerminateJobObject(
  1016. IN HANDLE JobHandle,
  1017. IN NTSTATUS ExitStatus
  1018. );
  1019. //NTSYSAPI
  1020. NTSTATUS
  1021. NTAPI
  1022. VfZwTerminateProcess(
  1023. IN HANDLE ProcessHandle OPTIONAL,
  1024. IN NTSTATUS ExitStatus
  1025. );
  1026. //NTSYSAPI
  1027. NTSTATUS
  1028. NTAPI
  1029. VfZwTranslateFilePath (
  1030. IN PFILE_PATH InputFilePath,
  1031. IN ULONG OutputType,
  1032. OUT PFILE_PATH OutputFilePath,
  1033. IN OUT PULONG OutputFilePathLength
  1034. );
  1035. //NTSYSAPI
  1036. NTSTATUS
  1037. NTAPI
  1038. VfZwUnloadDriver(
  1039. IN PUNICODE_STRING DriverServiceName
  1040. );
  1041. //NTSYSAPI
  1042. NTSTATUS
  1043. NTAPI
  1044. VfZwUnloadKey(
  1045. IN POBJECT_ATTRIBUTES TargetKey
  1046. );
  1047. //NTSYSAPI
  1048. NTSTATUS
  1049. NTAPI
  1050. VfZwUnmapViewOfSection(
  1051. IN HANDLE ProcessHandle,
  1052. IN PVOID BaseAddress
  1053. );
  1054. //NTSYSAPI
  1055. NTSTATUS
  1056. NTAPI
  1057. VfZwWaitForMultipleObjects(
  1058. IN ULONG Count,
  1059. IN HANDLE Handles[],
  1060. IN WAIT_TYPE WaitType,
  1061. IN BOOLEAN Alertable,
  1062. IN PLARGE_INTEGER Timeout OPTIONAL
  1063. );
  1064. //NTSYSAPI
  1065. NTSTATUS
  1066. NTAPI
  1067. VfZwWaitForSingleObject(
  1068. IN HANDLE Handle,
  1069. IN BOOLEAN Alertable,
  1070. IN PLARGE_INTEGER Timeout OPTIONAL
  1071. );
  1072. //NTSYSAPI
  1073. NTSTATUS
  1074. NTAPI
  1075. VfZwWriteFile(
  1076. IN HANDLE FileHandle,
  1077. IN HANDLE Event OPTIONAL,
  1078. IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
  1079. IN PVOID ApcContext OPTIONAL,
  1080. OUT PIO_STATUS_BLOCK IoStatusBlock,
  1081. IN PVOID Buffer,
  1082. IN ULONG Length,
  1083. IN PLARGE_INTEGER ByteOffset OPTIONAL,
  1084. IN PULONG Key OPTIONAL
  1085. );
  1086. //NTSYSAPI
  1087. NTSTATUS
  1088. NTAPI
  1089. VfZwYieldExecution (
  1090. VOID
  1091. );
  1092. #endif