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.

265 lines
4.5 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. ntwow64.h
  5. Abstract:
  6. This module contains headers for fake kernel entrypoints(wow64 BOPS) in ntdll.
  7. Author:
  8. Michael Zoran (mzoran) 22-NOV-1998
  9. Environment:
  10. User Mode only
  11. Revision History:
  12. May 07, 2001 SamerA Added NtWow64GetNativeSystemInformation()
  13. July 2002 JayKrell
  14. removed NtWow64QuerySection64
  15. added NtWow64QueryInformationProcess64
  16. publish it, ifndef guard, pragma once, subsection ifdef guards
  17. --*/
  18. #ifndef _NTWOW64_
  19. #define _NTWOW64_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif
  23. #if defined(_NTCSRMSG_)
  24. NTSYSAPI
  25. NTSTATUS
  26. NTAPI
  27. NtWow64CsrClientConnectToServer(
  28. IN PWSTR ObjectDirectory,
  29. IN ULONG ServerDllIndex,
  30. IN PVOID ConnectionInformation,
  31. IN OUT PULONG ConnectionInformationLength OPTIONAL,
  32. OUT PBOOLEAN CalledFromServer OPTIONAL
  33. );
  34. NTSYSAPI
  35. NTSTATUS
  36. NTAPI
  37. NtWow64CsrNewThread(
  38. VOID
  39. );
  40. NTSYSAPI
  41. NTSTATUS
  42. NTAPI
  43. NtWow64CsrIdentifyAlertableThread(
  44. VOID
  45. );
  46. NTSYSAPI
  47. NTSTATUS
  48. NTAPI
  49. NtWow64CsrClientCallServer(
  50. IN OUT PCSR_API_MSG m,
  51. IN OUT PCSR_CAPTURE_HEADER CaptureBuffer OPTIONAL,
  52. IN CSR_API_NUMBER ApiNumber,
  53. IN ULONG ArgLength
  54. );
  55. NTSYSAPI
  56. PCSR_CAPTURE_HEADER
  57. NTAPI
  58. NtWow64CsrAllocateCaptureBuffer(
  59. IN ULONG CountMessagePointers,
  60. IN ULONG Size
  61. );
  62. NTSYSAPI
  63. VOID
  64. NTAPI
  65. NtWow64CsrFreeCaptureBuffer(
  66. IN PCSR_CAPTURE_HEADER CaptureBuffer
  67. );
  68. NTSYSAPI
  69. ULONG
  70. NTAPI
  71. NtWow64CsrAllocateMessagePointer(
  72. IN OUT PCSR_CAPTURE_HEADER CaptureBuffer,
  73. IN ULONG Length,
  74. OUT PVOID *Pointer
  75. );
  76. NTSYSAPI
  77. VOID
  78. NTAPI
  79. NtWow64CsrCaptureMessageBuffer(
  80. IN OUT PCSR_CAPTURE_HEADER CaptureBuffer,
  81. IN PVOID Buffer OPTIONAL,
  82. IN ULONG Length,
  83. OUT PVOID *CapturedBuffer
  84. );
  85. NTSYSAPI
  86. VOID
  87. NTAPI
  88. NtWow64CsrCaptureMessageString(
  89. IN OUT PCSR_CAPTURE_HEADER CaptureBuffer,
  90. IN PCSTR String OPTIONAL,
  91. IN ULONG Length,
  92. IN ULONG MaximumLength,
  93. OUT PSTRING CapturedString
  94. );
  95. NTSYSAPI
  96. NTSTATUS
  97. NTAPI
  98. NtWow64CsrSetPriorityClass(
  99. IN HANDLE ProcessHandle,
  100. IN OUT PULONG PriorityClass
  101. );
  102. NTSYSAPI
  103. HANDLE
  104. NTAPI
  105. NtWow64CsrGetProcessId(
  106. VOID
  107. );
  108. #endif /* _NTCSRMSG_ */
  109. #if defined(_NTDBG_)
  110. NTSYSAPI
  111. NTSTATUS
  112. NTAPI
  113. NtDbgUiConnectToDbg( VOID );
  114. NTSTATUS
  115. NtDbgUiWaitStateChange (
  116. OUT PDBGUI_WAIT_STATE_CHANGE StateChange,
  117. IN PLARGE_INTEGER Timeout OPTIONAL
  118. );
  119. NTSYSAPI
  120. NTSTATUS
  121. NTAPI
  122. NtDbgUiContinue (
  123. IN PCLIENT_ID AppClientId,
  124. IN NTSTATUS ContinueStatus
  125. );
  126. NTSYSAPI
  127. NTSTATUS
  128. NTAPI
  129. NtDbgUiStopDebugging (
  130. IN HANDLE Process
  131. );
  132. NTSYSAPI
  133. NTSTATUS
  134. NTAPI
  135. NtDbgUiDebugActiveProcess (
  136. IN HANDLE Process
  137. );
  138. NTSYSAPI
  139. VOID
  140. NTAPI
  141. NtDbgUiRemoteBreakin (
  142. IN PVOID Context
  143. );
  144. NTSYSAPI
  145. HANDLE
  146. NTAPI
  147. NtDbgUiGetThreadDebugObject (
  148. VOID
  149. );
  150. #endif /* _NTDBG_ */
  151. // This is used in place of INT 2D
  152. NTSYSAPI
  153. NTSTATUS
  154. NTAPI
  155. NtWow64DebuggerCall (
  156. IN ULONG ServiceClass,
  157. IN ULONG Arg1,
  158. IN ULONG Arg2,
  159. IN ULONG Arg3,
  160. IN ULONG Arg4
  161. );
  162. NTSYSAPI
  163. NTSTATUS
  164. NTAPI
  165. NtWow64GetNativeSystemInformation(
  166. IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
  167. OUT PVOID NativeSystemInformation,
  168. IN ULONG InformationLength,
  169. OUT PULONG ReturnLength OPTIONAL
  170. );
  171. #if defined(BUILD_WOW6432)
  172. typedef VOID * __ptr64 NATIVE_PVOID;
  173. #else
  174. typedef PVOID NATIVE_PVOID;
  175. #endif
  176. typedef ULONGLONG SIZE_T64,*PSIZE_T64;
  177. #if defined(BUILD_WOW6432)
  178. #if defined(_NTPSAPI_)
  179. NTSYSAPI
  180. NTSTATUS
  181. NTAPI
  182. NtWow64QueryInformationProcess64(
  183. IN HANDLE ProcessHandle,
  184. IN PROCESSINFOCLASS ProcessInformationClass,
  185. OUT PVOID ProcessInformation,
  186. IN ULONG ProcessInformationLength,
  187. OUT PULONG ReturnLength OPTIONAL
  188. );
  189. #endif
  190. NTSYSAPI
  191. NTSTATUS
  192. NTAPI
  193. NtWow64ReadVirtualMemory64(
  194. IN HANDLE ProcessHandle,
  195. IN NATIVE_PVOID BaseAddress,
  196. OUT PVOID Buffer,
  197. IN SIZE_T64 BufferSize,
  198. OUT PSIZE_T64 NumberOfBytesRead OPTIONAL
  199. );
  200. #if defined(_NTMMAPI_)
  201. NTSYSAPI
  202. NTSTATUS
  203. NTAPI
  204. NtWow64QueryVirtualMemory64(
  205. IN HANDLE ProcessHandle,
  206. IN NATIVE_PVOID BaseAddress,
  207. IN MEMORY_INFORMATION_CLASS MemoryInformationClass,
  208. OUT PVOID MemoryInformation,
  209. IN SIZE_T64 MemoryInformationLength,
  210. OUT PSIZE_T64 ReturnLength OPTIONAL
  211. );
  212. #endif
  213. #endif
  214. #endif /* _NTWOW64_ */