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.

272 lines
17 KiB

  1. //
  2. // apitrace.h - Interface definitions for kernel32 api tracing support
  3. //
  4. //
  5. // Apitbl.asm defines the api information table, made up of APIINFOBLOCKs.
  6. //
  7. typedef struct _api_info_block {
  8. DWORD aib_nArgs; // number of arguments to api
  9. char *aib_apiName; // zero terminated api name string
  10. } APIINFOBLOCK;
  11. typedef APIINFOBLOCK *PAPIINFOBLOCK;
  12. extern APIINFOBLOCK ApiInfoTable[];
  13. //
  14. // Define a unique constant for each api that is also an index into the
  15. // api information table.
  16. //
  17. // If you define a new api constant here, you should also add an entry
  18. // in the api information table in apitbl.asm.
  19. //
  20. #define API_GetLocalTime 0
  21. #define API_EnterCriticalSection API_GetLocalTime + 1
  22. #define API_LeaveCriticalSection API_EnterCriticalSection + 1
  23. #define API_WaitForSingleObjectEx API_LeaveCriticalSection + 1
  24. #define API_ResetEvent API_WaitForSingleObjectEx + 1
  25. #define API_SetEvent API_ResetEvent + 1
  26. #define API_CreateFileA API_SetEvent + 1
  27. #define API_FileTimeToDosDateTime API_CreateFileA + 1
  28. #define API_TlsGetValue API_FileTimeToDosDateTime + 1
  29. #define API_DuplicateHandle API_TlsGetValue + 1
  30. #define API_MapViewOfFileEx API_DuplicateHandle + 1
  31. #define API_OutputDebugStringA API_MapViewOfFileEx + 1
  32. #define API_FatalExit API_OutputDebugStringA + 1
  33. #define API_FatalAppExitA API_FatalExit + 1
  34. #define API_GetThreadSelectorEntry API_FatalAppExitA + 1
  35. #define API_SetThreadContext API_GetThreadSelectorEntry + 1
  36. #define API_GetThreadContext API_SetThreadContext + 1
  37. #define API_WriteProcessMemory API_GetThreadContext + 1
  38. #define API_ReadProcessMemory API_WriteProcessMemory + 1
  39. #define API_DebugActiveProcess API_ReadProcessMemory + 1
  40. #define API_ContinueDebugEvent API_DebugActiveProcess + 1
  41. #define API_WaitForDebugEvent API_ContinueDebugEvent + 1
  42. #define API_GetExitCodeThread API_WaitForDebugEvent + 1
  43. #define API_GetCurrentThread API_GetExitCodeThread + 1
  44. #define API_CreateThread API_GetCurrentThread + 1
  45. #define API_CreateKernelThread API_CreateThread + 1
  46. #define API_GetCurrentProcessId API_CreateKernelThread + 1
  47. #define API_GetCurrentProcess API_GetCurrentProcessId + 1
  48. #define API_SetEnvironmentVariableA API_GetCurrentProcess + 1
  49. #define API_GetEnvironmentVariableA API_SetEnvironmentVariableA + 1
  50. #define API_GetStartupInfoA API_GetEnvironmentVariableA + 1
  51. #define API_GetExitCodeProcess API_GetStartupInfoA + 1
  52. #define API_OpenProcess API_GetExitCodeProcess + 1
  53. #define API_ExitProcess API_OpenProcess + 1
  54. #define API_SearchPathA API_ExitProcess + 1
  55. #define API_GetOverlappedResult API_SearchPathA + 1
  56. #define API_InterlockedDecrement API_GetOverlappedResult + 1
  57. #define API_InterlockedIncrement API_InterlockedDecrement + 1
  58. #define API_OpenSemaphoreA API_InterlockedIncrement + 1
  59. #define API_OpenMutexA API_OpenSemaphoreA + 1
  60. #define API_OpenEventA API_OpenMutexA + 1
  61. #define API_UninitializeCriticalSection API_OpenEventA + 1
  62. #define API_MakeCriticalSectionGlobal API_UninitializeCriticalSection + 1
  63. #define API_DeleteCriticalSection API_MakeCriticalSectionGlobal + 1
  64. #define API_ReinitializeCriticalSection API_DeleteCriticalSection + 1
  65. #define API_InitializeCriticalSection API_ReinitializeCriticalSection + 1
  66. #define API_WaitForMultipleObjectsEx API_InitializeCriticalSection + 1
  67. #define API_ReleaseSemaphore API_WaitForMultipleObjectsEx + 1
  68. #define API_ReleaseMutex API_ReleaseSemaphore + 1
  69. #define API_PulseEvent API_ReleaseMutex + 1
  70. #define API_CreateSemaphoreA API_PulseEvent + 1
  71. #define API_CreateMutexA API_CreateSemaphoreA + 1
  72. #define API_CreateEventA API_CreateMutexA + 1
  73. #define API_CloseHandle API_CreateEventA + 1
  74. #define API_FlushViewOfFile API_CloseHandle + 1
  75. #define API_UnmapViewOfFile API_FlushViewOfFile + 1
  76. #define API_OpenFileMappingA API_UnmapViewOfFile + 1
  77. #define API_GetSystemDirectoryA API_OpenFileMappingA + 1
  78. #define API_GetWindowsDirectoryA API_GetSystemDirectoryA + 1
  79. #define API__llseek API_GetWindowsDirectoryA + 1
  80. #define API__lclose API__llseek + 1
  81. #define API__lwrite API__lclose + 1
  82. #define API__lread API__lwrite + 1
  83. #define API__lcreat API__lread + 1
  84. #define API__lopen API__lcreat + 1
  85. #define API_GetLogicalDrives API__lopen + 1
  86. #define API_GetLogicalDriveStringsA API_GetLogicalDrives + 1
  87. #define API_CreateDirectoryA API_GetLogicalDriveStringsA + 1
  88. #define API_CreateDirectoryExA API_CreateDirectoryA + 1
  89. #define API_RemoveDirectoryA API_CreateDirectoryExA + 1
  90. #define API_GetDriveTypeA API_RemoveDirectoryA + 1
  91. #define API_GetTempPathA API_GetDriveTypeA + 1
  92. #define API_GetTempFileNameA API_GetTempPathA + 1
  93. #define API_GetDiskFreeSpaceA API_GetTempFileNameA + 1
  94. #define API_GetDiskFreeSpaceExA API_GetDiskFreeSpaceA + 1
  95. #define API_GetVolumeInformationA API_GetDiskFreeSpaceExA + 1
  96. #define API_CopyFileA API_GetVolumeInformationA + 1
  97. #define API_GetFileAttributesA API_CopyFileA + 1
  98. #define API_SetFileAttributesA API_GetFileAttributesA + 1
  99. #define API_DeleteFileA API_SetFileAttributesA + 1
  100. #define API_MoveFileA API_DeleteFileA + 1
  101. #define API_MoveFileExA API_MoveFileA + 1
  102. #define API_GetFileType API_MoveFileExA + 1
  103. #define API_SetHandleCount API_GetFileType + 1
  104. #define API_LockFile API_SetHandleCount + 1
  105. #define API_UnlockFile API_LockFile + 1
  106. #define API_ReadFile API_UnlockFile + 1
  107. #define API_WriteFile API_ReadFile + 1
  108. #define API_SetEndOfFile API_WriteFile + 1
  109. #define API_SetFilePointer API_SetEndOfFile + 1
  110. #define API_GetFileSize API_SetFilePointer + 1
  111. #define API_GetFileTime API_GetFileSize + 1
  112. #define API_SetFileTime API_GetFileTime + 1
  113. #define API_FlushFileBuffers API_SetFileTime + 1
  114. #define API_FindFirstFileA API_FlushFileBuffers + 1
  115. #define API_FindNextFileA API_FindFirstFileA + 1
  116. #define API_FindClose API_FindNextFileA + 1
  117. #define API_DeviceIoControl API_FindClose + 1
  118. #define API_CreatePipe API_DeviceIoControl + 1
  119. #define API_OpenFile API_CreatePipe + 1
  120. #define API_FindNextChangeNotification API_OpenFile + 1
  121. #define API_FindFirstChangeNotificationA API_FindNextChangeNotification + 1
  122. #define API_TlsSetValue API_FindFirstChangeNotificationA + 1
  123. #define API_TlsFree API_TlsSetValue + 1
  124. #define API_TlsAlloc API_TlsFree + 1
  125. #define API_GetPriorityClass API_TlsAlloc + 1
  126. #define API_SetPriorityClass API_GetPriorityClass + 1
  127. #define API_GetThreadPriority API_SetPriorityClass + 1
  128. #define API_SetThreadPriority API_GetThreadPriority + 1
  129. #define API_CompareFileTime API_SetThreadPriority + 1
  130. #define API_DosDateTimeToFileTime API_CompareFileTime + 1
  131. #define API_SystemTimeToFileTime API_DosDateTimeToFileTime + 1
  132. #define API_FileTimeToSystemTime API_SystemTimeToFileTime + 1
  133. #define API_LocalFileTimeToFileTime API_FileTimeToSystemTime + 1
  134. #define API_FileTimeToLocalFileTime API_LocalFileTimeToFileTime + 1
  135. #define API_SetSystemTime API_FileTimeToLocalFileTime + 1
  136. #define API_GetSystemTime API_SetSystemTime + 1
  137. #define API_SetTimeZoneInformation API_GetSystemTime + 1
  138. #define API_GetTimeZoneInformation API_SetTimeZoneInformation + 1
  139. #define API_SetDaylightFlag API_GetTimeZoneInformation + 1
  140. #define API_SetLocalTime API_SetDaylightFlag + 1
  141. #define API_FreeConsole API_SetLocalTime + 1
  142. #define API_AllocConsole API_FreeConsole + 1
  143. #define API_SetConsoleWindowInfo API_AllocConsole + 1
  144. #define API_GetLargestConsoleWindowSize API_SetConsoleWindowInfo + 1
  145. #define API_SetConsoleScreenBufferSize API_GetLargestConsoleWindowSize + 1
  146. #define API_ScrollConsoleScreenBufferA API_SetConsoleScreenBufferSize + 1
  147. #define API_ReadConsoleOutputA API_ScrollConsoleScreenBufferA + 1
  148. #define API_GetNumberOfConsoleMouseButtons API_ReadConsoleOutputA + 1
  149. #define API_GetConsoleCursorInfo API_GetNumberOfConsoleMouseButtons +1
  150. #define API_WriteConsoleOutputAttribute API_GetConsoleCursorInfo + 1
  151. #define API_WriteConsoleInputA API_WriteConsoleOutputAttribute + 1
  152. #define API_SetConsoleTextAttribute API_WriteConsoleInputA + 1
  153. #define API_GetNumberOfConsoleInputEvents API_SetConsoleTextAttribute + 1
  154. #define API_FlushConsoleInputBuffer API_GetNumberOfConsoleInputEvents + 1
  155. #define API_FillConsoleOutputAttribute API_FlushConsoleInputBuffer + 1
  156. #define API_FillConsoleOutputCharacterA API_FillConsoleOutputAttribute + 1
  157. #define API_ReadConsoleOutputAttribute API_FillConsoleOutputCharacterA + 1
  158. #define API_ReadConsoleOutputCharacterA API_ReadConsoleOutputAttribute + 1
  159. #define API_WriteConsoleOutputCharacterA API_ReadConsoleOutputCharacterA + 1
  160. #define API_WriteConsoleOutputA API_WriteConsoleOutputCharacterA + 1
  161. #define API_SetConsoleCtrlHandler API_WriteConsoleOutputA + 1
  162. #define API_SetConsoleActiveScreenBuffer API_SetConsoleCtrlHandler + 1
  163. #define API_CreateConsoleScreenBuffer API_SetConsoleActiveScreenBuffer + 1
  164. #define API_ReadConsoleInputA API_CreateConsoleScreenBuffer + 1
  165. #define API_PeekConsoleInputA API_ReadConsoleInputA + 1
  166. #define API_SetConsoleTitleA API_PeekConsoleInputA + 1
  167. #define API_GetConsoleTitleA API_SetConsoleTitleA + 1
  168. #define API_GetConsoleScreenBufferInfo API_GetConsoleTitleA + 1
  169. #define API_SetConsoleCursorPosition API_GetConsoleScreenBufferInfo + 1
  170. #define API_SetConsoleCursorInfo API_SetConsoleCursorPosition + 1
  171. #define API_GetConsoleMode API_SetConsoleCursorInfo + 1
  172. #define API_SetConsoleMode API_GetConsoleMode + 1
  173. #define API_ReadConsoleA API_SetConsoleMode + 1
  174. #define API_WriteConsoleA API_ReadConsoleA + 1
  175. #define API_SetFileApisToOEM API_WriteConsoleA + 1
  176. #define API_CallNamedPipeA API_SetFileApisToOEM + 1
  177. #define API_GetNamedPipeInfo API_CallNamedPipeA + 1
  178. #define API_SetNamedPipeHandleState API_GetNamedPipeInfo + 1
  179. #define API_GetNamedPipeHandleStateA API_SetNamedPipeHandleState + 1
  180. #define API_TransactNamedPipe API_GetNamedPipeHandleStateA + 1
  181. #define API_PeekNamedPipe API_TransactNamedPipe + 1
  182. #define API_WaitNamedPipeA API_PeekNamedPipe + 1
  183. #define API_SetMailslotInfo API_WaitNamedPipeA + 1
  184. #define API_GetMailslotInfo API_SetMailslotInfo + 1
  185. #define API_CreateMailslotA API_GetMailslotInfo + 1
  186. #define API_QueryDosDeviceA API_CreateMailslotA + 1
  187. #define API_SetCommConfig API_QueryDosDeviceA + 1
  188. #define API_GetCommConfig API_SetCommConfig + 1
  189. #define API_WaitCommEvent API_GetCommConfig + 1
  190. #define API_TransmitCommChar API_WaitCommEvent + 1
  191. #define API_SetCommTimeouts API_TransmitCommChar + 1
  192. #define API_SetCommMask API_SetCommTimeouts + 1
  193. #define API_PurgeComm API_SetCommMask + 1
  194. #define API_GetCommTimeouts API_PurgeComm + 1
  195. #define API_GetCommProperties API_GetCommTimeouts + 1
  196. #define API_GetCommModemStatus API_GetCommProperties + 1
  197. #define API_GetCommMask API_GetCommModemStatus + 1
  198. #define API_ClearCommError API_GetCommMask + 1
  199. #define API_EscapeCommFunction API_ClearCommError + 1
  200. #define API_GetCommState API_EscapeCommFunction + 1
  201. #define API_SetCommState API_GetCommState + 1
  202. #define API_SetupComm API_SetCommState + 1
  203. #define API_GetSystemInfo API_SetupComm + 1
  204. #define API_Module32Next API_GetSystemInfo + 1
  205. #define API_Module32First API_Module32Next + 1
  206. #define API_Thread32Next API_Module32First + 1
  207. #define API_Thread32First API_Thread32Next + 1
  208. #define API_Process32Next API_Thread32First + 1
  209. #define API_Process32First API_Process32Next + 1
  210. #define API_Heap32ListNext API_Process32First + 1
  211. #define API_Heap32ListFirst API_Heap32ListNext + 1
  212. #define API_CreateToolhelp32Snapshot API_Heap32ListFirst + 1
  213. #define API_ConvertToGlobalHandle API_CreateToolhelp32Snapshot + 1
  214. #define API_CreateFileMappingA API_ConvertToGlobalHandle + 1
  215. #define API_GetFileInformationByHandle API_CreateFileMappingA + 1
  216. #define API_InterlockedExchange API_GetFileInformationByHandle+1
  217. #define API_GetProcessAffinityMask API_InterlockedExchange + 1
  218. #define API_SetThreadAffinityMask API_GetProcessAffinityMask+1
  219. #define API_GetTickCount API_SetThreadAffinityMask+1
  220. #define API_HeapCreate API_GetTickCount+1
  221. #define API_VirtualQuery API_HeapCreate+1
  222. #define API_VirtualQueryEx API_VirtualQuery+1
  223. #define API_VirtualProtect API_VirtualQueryEx+1
  224. #define API_VirtualProtectEx API_VirtualProtect+1
  225. #define API_GetShortPathNameA API_VirtualProtectEx+1
  226. #define API_QueueUserAPC API_GetShortPathNameA+1
  227. #define API_ExpandEnvironmentStringsA API_QueueUserAPC+1
  228. #define API_FindResourceA API_ExpandEnvironmentStringsA+1
  229. #define API_FindResourceW API_FindResourceA+1
  230. #define API_FindResourceExA API_FindResourceW+1
  231. #define API_FindResourceExW API_FindResourceExA+1
  232. #define API_EnumResourceTypesA API_FindResourceExW+1
  233. #define API_EnumResourceTypesW API_EnumResourceTypesA+1
  234. #define API_EnumResourceNamesA API_EnumResourceTypesW+1
  235. #define API_EnumResourceNamesW API_EnumResourceNamesA+1
  236. #define API_EnumResourceLanguagesA API_EnumResourceNamesW+1
  237. #define API_EnumResourceLanguagesW API_EnumResourceLanguagesA+1
  238. #define API_GetEnvironmentStringsA API_EnumResourceLanguagesW+1
  239. #define API_FreeEnvironmentStringsA API_GetEnvironmentStringsA+1
  240. #define API_SetFileApisToANSI API_FreeEnvironmentStringsA+1
  241. #define API_AreFileApisANSI API_SetFileApisToANSI+1
  242. #define API_GetThreadLocale API_AreFileApisANSI+1
  243. #define API_GetComputerNameA API_GetThreadLocale+1
  244. #define API_SetComputerNameA API_GetComputerNameA+1
  245. #define API_GetProcessVersion API_SetComputerNameA+1
  246. #define API_GetSystemTimeAsFileTime API_GetProcessVersion+1
  247. #define API_TlsFreeGlobal API_GetSystemTimeAsFileTime + 1
  248. #define API_TlsAllocGlobal API_TlsFreeGlobal + 1
  249. #define API_CreateWaitableTimerA API_TlsAllocGlobal+1
  250. #define API_OpenWaitableTimerA API_CreateWaitableTimerA+1
  251. #define API_SetWaitableTimer API_OpenWaitableTimerA+1
  252. #define API_CancelWaitableTimer API_SetWaitableTimer+1
  253. #define API_GetLongPathNameA API_CancelWaitableTimer+1
  254. #define API_GetFileAttributesExA API_GetLongPathNameA+1
  255. #define API_DefineDosDeviceA API_GetFileAttributesExA+1
  256. #define API_OpenThread API_DefineDosDeviceA+1
  257. #ifdef WOW
  258. // Note: on 9X, somebody added API_CancelIO incorrectly.
  259. #define API_CancelIo API_OpenThread+1
  260. #define API_VerifyVersionInfoW API_CancelIo+1
  261. #define NAPI_INFO_BLOCKS API_VerifyVersionInfoW
  262. #else
  263. #define NAPI_INFO_BLOCKS API_OpenThread
  264. #define API_CancelIo NAPI_INFO_BLOCKS+1
  265. #endif