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.

1163 lines
58 KiB

  1. /****************************************************************************
  2. *
  3. * (C) Copyright MICROSOFT Corp., 1993
  4. *
  5. * Title: VXDWRAPS.H - Include file for using VXDWRAPS.LIB
  6. *
  7. * Version: 1.00
  8. *
  9. * Date: 18-September-1993
  10. *
  11. * Author: PYS
  12. *
  13. *--------------------------------------------------------------------------
  14. *
  15. * Change log:
  16. *
  17. ***************************************************************************/
  18. #ifndef _VXDWRAPS_H
  19. #define _VXDWRAPS_H
  20. #ifndef NOBASEDEFS
  21. typedef (*PFN)(); // pfn
  22. typedef PFN *PPFN; // ppfn
  23. #endif // NOBASEDEFS
  24. #ifdef _VMM_
  25. #define VMM_MAP_PHYS_TO_LINEAR_INVALID 0xFFFFFFFF
  26. typedef VOID (_cdecl *VMM_TIMEOUT_HANDLER)();
  27. typedef VOID (_cdecl *VMM_EVENT_HANDLER)();
  28. typedef VOID (_cdecl *VMM_HOOK_HANDLER)(VOID);
  29. typedef ULONG (_cdecl *VMMSWP)(ULONG frame, ULONG npages);
  30. typedef VOID (_cdecl *VMMCOMS)(DWORD dwParam);
  31. typedef DWORD (_cdecl *VMMCOMNFS)();
  32. typedef struct Exception_Handler_Struc *PVMMEXCEPTION;
  33. //typedef QWORD DESCDWORDS;
  34. typedef DWORD VMMEVENT;
  35. typedef DWORD VMMLIST;
  36. typedef PVOID VMMLISTNODE;
  37. typedef DWORD SIGNATURE;
  38. typedef SIGNATURE *PSIGNATURE; // Pointer to a signature.
  39. typedef struct _vmmmtx {int unused;} *PVMMMUTEX;
  40. typedef struct cb_s *PVMMCB;
  41. #endif // _VMM_
  42. #define CAT_HELPER(x, y) x##y
  43. #define CAT(x, y) CAT_HELPER(x, y)
  44. #ifndef CURSEG
  45. #define CURSEG() LCODE
  46. #endif
  47. /****************************************************************************
  48. *
  49. * There are two types of VxD 'C' wrappers. The ones that are VXDINLINE and
  50. * the one that have little stubs.
  51. *
  52. ***************************************************************************/
  53. /****************************************************************************
  54. *
  55. * The following are VxD wrappers done with VXDINLINE. They must return void
  56. * (to avoid a problem with C++), must take VOID (so that no parameter are
  57. * used as temporary stack) and all registers are preserved. The two
  58. * *_Debug_String also fall in that category since they need esp and ebp
  59. * not to be in a nested stack frame.
  60. *
  61. ***************************************************************************/
  62. #ifdef _VMM_
  63. VOID VXDINLINE
  64. Load_FS_Service(VOID)
  65. {
  66. VMMCall(Load_FS_Service)
  67. }
  68. VOID VXDINLINE
  69. End_Critical_Section(VOID)
  70. {
  71. VMMCall(End_Critical_Section)
  72. }
  73. VOID VXDINLINE
  74. Fatal_Memory_Handler(VOID)
  75. {
  76. VMMJmp(Fatal_Memory_Error);
  77. }
  78. VOID VXDINLINE
  79. Begin_Nest_Exec(VOID)
  80. {
  81. VMMCall(Begin_Nest_Exec)
  82. }
  83. VOID VXDINLINE
  84. End_Nest_Exec(VOID)
  85. {
  86. VMMCall(End_Nest_Exec)
  87. }
  88. VOID VXDINLINE
  89. Resume_Exec(VOID)
  90. {
  91. VMMCall(Resume_Exec)
  92. }
  93. VOID VXDINLINE
  94. Enable_Touch_1st_Meg(VOID)
  95. {
  96. VMMCall(Enable_Touch_1st_Meg)
  97. }
  98. VOID VXDINLINE
  99. Disable_Touch_1st_Meg(VOID)
  100. {
  101. VMMCall(Disable_Touch_1st_Meg)
  102. }
  103. VOID VXDINLINE
  104. Out_Debug_String(PCHAR psz)
  105. {
  106. __asm pushad
  107. __asm mov esi, [psz]
  108. VMMCall(Out_Debug_String)
  109. __asm popad
  110. }
  111. VOID VXDINLINE
  112. Queue_Debug_String(PCHAR psz, ULONG ulEAX, ULONG ulEBX)
  113. {
  114. _asm push esi
  115. _asm push [ulEAX]
  116. _asm push [ulEBX]
  117. _asm mov esi, [psz]
  118. VMMCall(Queue_Debug_String)
  119. _asm pop esi
  120. }
  121. #endif // _VMM_
  122. #define MAKE_HEADER(RetType, DecType, Function, Parameters) \
  123. extern RetType DecType CAT(LCODE_, CAT(Function, Parameters)); \
  124. extern RetType DecType CAT(ICODE_, CAT(Function, Parameters)); \
  125. extern RetType DecType CAT(PCODE_, CAT(Function, Parameters)); \
  126. extern RetType DecType CAT(SCODE_, CAT(Function, Parameters)); \
  127. extern RetType DecType CAT(DCODE_, CAT(Function, Parameters)); \
  128. extern RetType DecType CAT(CCODE_, CAT(Function, Parameters)); \
  129. extern RetType DecType CAT(KCODE_, CAT(Function, Parameters));
  130. #define PREPEND(Name) CURSEG()##_##Name
  131. #ifdef _VMM_
  132. WORD VXDINLINE
  133. Get_VMM_Version(VOID)
  134. {
  135. WORD w;
  136. Touch_Register(eax)
  137. Touch_Register(ecx)
  138. Touch_Register(edx)
  139. VMMCall(Get_VMM_Version);
  140. _asm mov [w], ax
  141. return(w);
  142. }
  143. MAKE_HEADER(PVOID,_cdecl, _MapPhysToLinear, (ULONG PhysAddr, ULONG nBytes, ULONG flags))
  144. MAKE_HEADER(PVOID,_cdecl,_HeapAllocate, (ULONG Bytes, ULONG Flags))
  145. MAKE_HEADER(PVOID,_stdcall,_HeapAllocateEx, (ULONG cBytes, PVOID Res, PVOID Res1, ULONG flags))
  146. MAKE_HEADER(ULONG,_cdecl,_HeapFree, (PVOID Address, ULONG Flags))
  147. MAKE_HEADER(VOID,_stdcall,_HeapFreeEx, (PVOID Address, ULONG Flags))
  148. MAKE_HEADER(PVOID,_cdecl,_HeapReAllocate, (PVOID pOld, ULONG Bytes, ULONG Flags))
  149. MAKE_HEADER(ULONG,_cdecl,_HeapGetSize, (PVOID p, ULONG Flags))
  150. MAKE_HEADER(VOID,_stdcall,Fatal_Error_Handler, (PCHAR pszMessage, DWORD dwExitFlag))
  151. MAKE_HEADER(VOID,_stdcall,Begin_Critical_Section, (ULONG Flags))
  152. MAKE_HEADER(HEVENT,_stdcall,Schedule_Global_Event, (VMM_EVENT_HANDLER pfnEvent, ULONG ulRefData))
  153. MAKE_HEADER(VOID,_stdcall,Cancel_Global_Event, (HEVENT hEvent));
  154. MAKE_HEADER(HVM,_cdecl,Get_Sys_VM_Handle, (VOID))
  155. MAKE_HEADER(DWORD,_stdcall,Get_Profile_Hex_Int, (PCHAR pszSection, PCHAR pszKeyName, DWORD dwDefault))
  156. MAKE_HEADER(BOOL,_stdcall,Get_Profile_Boolean, (PCHAR pszSection, PCHAR pszKeyName, BOOL fDefault))
  157. MAKE_HEADER(VMM_SEMAPHORE,_stdcall,Create_Semaphore, (LONG lTokenCount))
  158. MAKE_HEADER(VOID,_stdcall,Destroy_Semaphore, (VMM_SEMAPHORE vsSemaphore))
  159. MAKE_HEADER(VOID,_stdcall,Signal_Semaphore, (VMM_SEMAPHORE vsSemaphore))
  160. MAKE_HEADER(VOID,_stdcall,Wait_Semaphore, (VMM_SEMAPHORE vsSemaphore, DWORD dwFlags))
  161. MAKE_HEADER(HVM,_cdecl,Get_Execution_Focus, (VOID))
  162. MAKE_HEADER(HTIMEOUT,_stdcall,Set_VM_Time_Out, (VMM_TIMEOUT_HANDLER pfnTimeout, CMS cms, ULONG ulRefData))
  163. MAKE_HEADER(HTIMEOUT,_stdcall,Set_Global_Time_Out, (VMM_TIMEOUT_HANDLER pfnTimeout, CMS cms, ULONG ulRefData))
  164. MAKE_HEADER(VOID,_stdcall,Cancel_Time_Out, (HTIMEOUT htimeout))
  165. MAKE_HEADER(VOID,_stdcall,Update_System_Clock, (ULONG msElapsed))
  166. MAKE_HEADER(BOOL,_stdcall,Install_Exception_Handler, (PVMMEXCEPTION pveException))
  167. MAKE_HEADER(PCHAR,_stdcall,Get_Exec_Path, (PULONG pulPathLength))
  168. MAKE_HEADER(DWORD,_cdecl,Get_Last_Updated_System_Time, (VOID))
  169. MAKE_HEADER(VMMLISTNODE,_stdcall,List_Allocate, (VMMLIST List))
  170. MAKE_HEADER(VOID,_stdcall,List_Attach, (VMMLIST List, VMMLISTNODE Node))
  171. MAKE_HEADER(VOID,_stdcall,List_Attach_Tail, (VMMLIST List, VMMLISTNODE Node))
  172. MAKE_HEADER(VMMLIST,_stdcall,List_Create, (ULONG Flags, ULONG NodeSize))
  173. MAKE_HEADER(VOID,_stdcall,List_Deallocate, (VMMLIST List, VMMLISTNODE Node))
  174. MAKE_HEADER(VOID,_stdcall,List_Destroy, (VMMLIST List))
  175. MAKE_HEADER(VMMLISTNODE,_stdcall,List_Get_First, (VMMLIST List))
  176. MAKE_HEADER(VMMLISTNODE,_stdcall,List_Get_Next, (VMMLIST List, VMMLISTNODE Node))
  177. MAKE_HEADER(VOID,_stdcall,List_Insert, (VMMLIST List, VMMLISTNODE NewNode, VMMLISTNODE Node))
  178. MAKE_HEADER(BOOL,_stdcall,List_Remove, (VMMLIST List, VMMLISTNODE Node))
  179. MAKE_HEADER(VMMLISTNODE,_stdcall,List_Remove_First, (VMMLIST List))
  180. MAKE_HEADER(PVOID,_cdecl,_PageAllocate, (DWORD nPages, DWORD pType, HVM hvm, DWORD AlignMask, DWORD minPhys, DWORD maxPhys, PVOID *PhysAddr, DWORD flags))
  181. MAKE_HEADER(BOOL,_cdecl,_PageFree, (PVOID hMem, DWORD flags))
  182. MAKE_HEADER(DWORD,_cdecl,_AddFreePhysPage, (ULONG PhysPgNum, ULONG nPages, ULONG flags, VMMSWP pfnSwapOutNotify))
  183. MAKE_HEADER(HVM,_cdecl,Get_Cur_VM_Handle, (VOID))
  184. MAKE_HEADER(BOOL,_cdecl,_LinPageLock, (DWORD HLinPgNum, DWORD nPages, DWORD flags))
  185. MAKE_HEADER(BOOL,_cdecl,_LinPageUnLock, (DWORD HLinPgNum, DWORD nPages, DWORD flags))
  186. MAKE_HEADER(DWORD,_cdecl,_Allocate_Device_CB_Area, (DWORD nBytes, DWORD flags))
  187. MAKE_HEADER(HVM,_stdcall,Get_Next_VM_Handle, (HVM hvm))
  188. MAKE_HEADER(BOOL,_stdcall,Test_Cur_VM_Handle, (HVM hvm))
  189. MAKE_HEADER(BOOL,_stdcall,Test_Sys_VM_Handle, (HVM hvm))
  190. MAKE_HEADER(BOOL,_stdcall,Hook_V86_Int_Chain, (VMM_HOOK_HANDLER pfHook, DWORD dwInterrupt))
  191. MAKE_HEADER(BOOL,_stdcall,Unhook_V86_Int_Chain, (VMM_HOOK_HANDLER pfHook, DWORD dwInterrupt))
  192. MAKE_HEADER(PCHAR,_cdecl,Get_Config_Directory,(VOID))
  193. MAKE_HEADER(DWORD,_cdecl,_Allocate_Temp_V86_Data_Area,(DWORD nBytes, DWORD Flags))
  194. MAKE_HEADER(BOOL,_cdecl,_Free_Temp_V86_Data_Area,(VOID))
  195. MAKE_HEADER(PVOID,_cdecl,_GetNulPageHandle,(VOID))
  196. MAKE_HEADER(VOID,_stdcall,Get_Machine_Info,(PULONG prEAX, PULONG prEBX, PULONG prECX, PULONG prEDX))
  197. MAKE_HEADER(ULONG,_cdecl,_PageModifyPermissions,(ULONG page, ULONG npages, ULONG permand, ULONG permor))
  198. //MAKE_HEADER(WORD,_cdecl,_Allocate_GDT_Selector, (DESCDWORDS DescDWORDS, ULONG flags))
  199. //MAKE_HEADER(DESCDWORDS,_cdecl,_BuildDescriptorDWORDs, (DWORD DESCBase, DWORD DESCLimit, DWORD DESCType, DWORD DESCSize, ULONG flags))
  200. //MAKE_HEADER(BOOL,_cdecl,_Free_GDT_Selector, (WORD Selector, ULONG flags))
  201. MAKE_HEADER(DWORD,_cdecl,_CallRing3, (DWORD ulCS, DWORD ulEIP, DWORD cbArgs, PDWORD lpvArgs))
  202. #ifdef WIN40SERVICES
  203. MAKE_HEADER(ULONG,_cdecl,VMM_GetSystemInitState, (VOID))
  204. MAKE_HEADER(VOID,_stdcall,_Trace_Out_Service, (PCHAR psz))
  205. MAKE_HEADER(VOID,_stdcall,_Debug_Out_Service, (PCHAR psz))
  206. MAKE_HEADER(VOID,_stdcall,_Debug_Flags_Service, (ULONG flags))
  207. MAKE_HEADER(VOID,_cdecl,_Debug_Printf_Service, (PCHAR pszfmt, ...))
  208. MAKE_HEADER(HTIMEOUT,_stdcall, Set_Async_Time_Out, (VMM_TIMEOUT_HANDLER pfnTimeout, CMS cms, ULONG ulRefData))
  209. MAKE_HEADER(PVMMDDB,_stdcall,Get_DDB, (WORD DeviceID, PCHAR Name))
  210. MAKE_HEADER(DWORD,_stdcall,Directed_Sys_Control, (PVMMDDB pDDB, DWORD SysControl, DWORD rEBX, DWORD rEDX, DWORD rESI, DWORD rEDI))
  211. MAKE_HEADER(BOOL,_cdecl,_Assert_Range, (PVOID p, ULONG ulSize, SIGNATURE sSignature, LONG lSignatureOffset, ULONG ulFlags))
  212. MAKE_HEADER(ULONG,_cdecl,_Sprintf, (PCHAR pszBuf, PCHAR pszFmt, ...))
  213. MAKE_HEADER(PVMMMUTEX,_cdecl,_CreateMutex, (LONG Boost, ULONG Flags))
  214. MAKE_HEADER(BOOL,_cdecl,_DestroyMutex, (PVMMMUTEX hmtx))
  215. MAKE_HEADER(VOID,_cdecl,_EnterMutex, (PVMMMUTEX hmtx, ULONG Flags))
  216. MAKE_HEADER(PTCB,_cdecl,_GetMutexOwner, (PVMMMUTEX hmtx))
  217. MAKE_HEADER(VOID,_cdecl,_LeaveMutex, (PVMMMUTEX hmtx))
  218. MAKE_HEADER(VOID,_cdecl,_SignalID, (DWORD id))
  219. MAKE_HEADER(VOID,_cdecl,_BlockOnID, (DWORD id, ULONG Flags))
  220. MAKE_HEADER(PCHAR,_cdecl,_lstrcpyn,(PCHAR pszDest,const char *pszSrc,DWORD cb))
  221. MAKE_HEADER(ULONG,_cdecl,_lstrlen,(const char *psz))
  222. MAKE_HEADER(ULONG,_cdecl,_lmemcpy,(PVOID pDst, const void *pSrc, DWORD cb))
  223. MAKE_HEADER(DWORD,_cdecl,Get_Boot_Flags, (VOID))
  224. MAKE_HEADER(PTCB,_cdecl,Get_Cur_Thread_Handle, (VOID))
  225. MAKE_HEADER(PVOID,_cdecl,_GetVxDName, (PVOID pLinAddr, PCHAR pBuffer))
  226. MAKE_HEADER(VOID,_cdecl,_Call_On_My_Stack, (VMMCOMS Callback, DWORD LParam, PVOID StackPtr, DWORD StackSize))
  227. MAKE_HEADER(PVOID,_cdecl,_PageReserve,(ULONG page, ULONG npages, ULONG flags))
  228. MAKE_HEADER(ULONG,_cdecl,_PageCommit,(ULONG page, ULONG npages, ULONG hpd, ULONG pagerdata, ULONG flags))
  229. MAKE_HEADER(ULONG,_cdecl,_PageDecommit,(ULONG page, ULONG npages, ULONG flags))
  230. MAKE_HEADER(ULONG,_cdecl,_PageCommitPhys,(ULONG page, ULONG npages, ULONG physpg, ULONG flags))
  231. MAKE_HEADER(DWORD,_cdecl,Open_Boot_Log,(VOID)) // Warning 0 means success
  232. MAKE_HEADER(VOID,_cdecl,Close_Boot_Log,(VOID))
  233. MAKE_HEADER(VOID,_stdcall,Write_Boot_Log,(DWORD dwLength, PCHAR pString))
  234. MAKE_HEADER(BOOL,_cdecl,_CopyPageTable,(ULONG PageNumber, ULONG nPages, PULONG ppte, ULONG flags))
  235. MAKE_HEADER(ULONG,_cdecl,_PhysIntoV86,(ULONG PhysPage, HVM VM, ULONG VMLinPgNum, ULONG nPages, ULONG flags))
  236. MAKE_HEADER(ULONG,_cdecl,_LinMapIntoV86,(ULONG HLinPgNum, HVM VM, ULONG VMLinPgNum, ULONG nPages, ULONG flags))
  237. MAKE_HEADER(ULONG,_cdecl,_ModifyPageBits,(HVM VM, ULONG VMLinPgNum, ULONG nPages, ULONG AndMask, ULONG OrMask, ULONG pType, ULONG flags))
  238. MAKE_HEADER(PVOID,_cdecl,_PageReAllocate,(PVOID pMem, ULONG nPages, ULONG flags))
  239. MAKE_HEADER(BOOL,_stdcall,VMM_Add_DDB, (PVMMDDB pDDB))
  240. MAKE_HEADER(BOOL,_stdcall,VMM_Remove_DDB, (PVMMDDB pDDB))
  241. MAKE_HEADER(ULONG,_cdecl,_AtEventTime,(VOID))
  242. MAKE_HEADER(VMMEVENT,_stdcall,Call_Restricted_Event,(ULONG ulBoost, HVM hvm, ULONG ulFlags, ULONG ulRefData, VMM_EVENT_HANDLER Handler, CMS cms))
  243. MAKE_HEADER(VOID,_stdcall,Cancel_Restricted_Event,(VMMEVENT Event))
  244. MAKE_HEADER(DWORD,_cdecl,_AllocateThreadDataSlot, (VOID))
  245. MAKE_HEADER(VOID,_cdecl,_FreeThreadDataSlot, (DWORD))
  246. MAKE_HEADER(PTCB,_stdcall,Get_Next_Thread_Handle, (PTCB))
  247. //
  248. // 4.1 Service
  249. //
  250. MAKE_HEADER(DWORD,_cdecl,_Call_On_My_Not_Flat_Stack, (DWORD dwCallback, DWORD dwNewCS, DWORD dwNewESP, DWORD dwNewSS, DWORD dwNewDS, DWORD dwNewES, DWORD dwStackSizeInWords, PVOID pFlatStackOffset, DWORD dwReturnOfFail, DWORD dwFlags))
  251. MAKE_HEADER(BOOL,_cdecl,_LinRegionLock, (DWORD dwBeginLock, DWORD dwEndLock, DWORD flags))
  252. MAKE_HEADER(BOOL,_cdecl,_LinRegionUnLock, (DWORD dwBeginLock, DWORD dwEndLock, DWORD flags))
  253. MAKE_HEADER(ASD_RESULT,_cdecl,_AttemptingSomethingDangerous,(DWORD dwFunction, VMMREFIID vrOperation, PVOID pRefData, DWORD dwSizeRefData, DWORD dwFlags))
  254. MAKE_HEADER(ULONG,_cdecl,_Vsprintf,(PCHAR pchBuffer, PCHAR pszFormat, PVOID paParameters))
  255. MAKE_HEADER(BOOL, _cdecl, _RegisterGARTHandler,(PVOID pGARTHandler))
  256. MAKE_HEADER(PVOID, _cdecl, _GARTReserve,(PVOID pDevObj, ULONG ulNumPages, ULONG ulAlignMask, PULONG pulGARTDev, ULONG ulFlags))
  257. MAKE_HEADER(BOOL, _cdecl, _GARTCommit,(PVOID pGARTLin, ULONG ulPageOffset, ULONG ulNumPages, PULONG pulGARTDev, ULONG ulFlags))
  258. MAKE_HEADER(VOID, _cdecl, _GARTUnCommit,(PVOID pGARTLin, ULONG ulPageOffset, ULONG ulNumPages))
  259. MAKE_HEADER(VOID, _cdecl, _GARTFree,(PVOID pGARTLin))
  260. MAKE_HEADER(VOID, _cdecl, _GARTMemAttributes,(PVOID pGARTLin, PULONG pulFlags))
  261. MAKE_HEADER(DWORD,_cdecl,_FlushCaches,(DWORD dwService))
  262. MAKE_HEADER(HTIMEOUT,_cdecl,_Set_Global_Time_Out_Ex, (VMM_TIMEOUT_HANDLER pfnTimeout, CMS cms, ULONG ulRefData, ULONG ulScheduleFlags))
  263. #endif // WIN40SERVICES
  264. #endif // _VMM_
  265. #ifdef _PCI_H
  266. WORD VXDINLINE
  267. PCI_Get_Version(VOID)
  268. {
  269. WORD w;
  270. Touch_Register(eax)
  271. VxDCall(_PCI_Get_Version);
  272. _asm mov [w], ax
  273. return(w);
  274. }
  275. MAKE_HEADER(DWORD,_cdecl,_PCI_Read_Config,(BYTE bBus, BYTE bDevFunc, BYTE bOffset))
  276. MAKE_HEADER(VOID,_cdecl,_PCI_Write_Config,(BYTE bBus, BYTE bDevFunc, BYTE bOffset, DWORD dwValue))
  277. MAKE_HEADER(BOOL,_cdecl,_PCI_Lock_Unlock,(DWORD dnDevNode, ULONG ulFlags))
  278. #endif // _PCI_H
  279. #ifdef _MTRR_H_
  280. WORD VXDINLINE
  281. MTRRGetVersion(VOID)
  282. {
  283. WORD w;
  284. Touch_Register(eax)
  285. VxDCall(_MTRR_Get_Version);
  286. _asm mov [w], ax;
  287. return (w);
  288. }
  289. MAKE_HEADER(ULONG,_stdcall,MTRRSetPhysicalCacheTypeRange,(PVOID PhysicalAddress, ULONG NumberOfBytes, MEMORY_CACHING_TYPE CacheType))
  290. #endif // _MTRR_H_
  291. #ifdef _NTKERN_H
  292. WORD VXDINLINE
  293. NTKERN_Get_Version(VOID)
  294. {
  295. WORD w;
  296. Touch_Register(eax)
  297. VxDCall(_NTKERN_Get_Version);
  298. _asm mov [w], ax
  299. return(w);
  300. }
  301. MAKE_HEADER(NTSTATUS,_stdcall,_NtKernCreateFile,(PHANDLE FileHandle,ACCESS_MASK DesiredAccess,\
  302. POBJECT_ATTRIBUTES ObjectAttributes,PIO_STATUS_BLOCK IoStatusBlock,PLARGE_INTEGER AllocationSize, \
  303. ULONG FileAttributes,ULONG ShareAccess,ULONG CreateDisposition,ULONG CreateOptions,PVOID EaBuffer,ULONG EaLength))
  304. MAKE_HEADER(NTSTATUS,_stdcall,_NtKernClose,(HANDLE FileHandle))
  305. MAKE_HEADER(NTSTATUS,_stdcall,_NtKernDeviceIoControl,(HANDLE FileHandle,HANDLE Event,PIO_APC_ROUTINE ApcRoutine,\
  306. PVOID ApcContext,PIO_STATUS_BLOCK IoStatusBlock,ULONG IoControlCode,PVOID InputBuffer,ULONG InputBufferLength,\
  307. PVOID OutputBuffer,ULONG OutputBufferLength))
  308. MAKE_HEADER(NTSTATUS,_stdcall,_NtKernReadFile,(HANDLE FileHandle,HANDLE Event,PIO_APC_ROUTINE ApcRoutine,PVOID ApcContext,\
  309. PIO_STATUS_BLOCK IoStatusBlock,PVOID Buffer,ULONG Length,PLARGE_INTEGER ByteOffset,PULONG Key))
  310. MAKE_HEADER(NTSTATUS,_stdcall,_NtKernWriteFile,(HANDLE FileHandle,HANDLE Event,PIO_APC_ROUTINE ApcRoutine,PVOID ApcContext,\
  311. PIO_STATUS_BLOCK IoStatusBlock,PVOID Buffer,ULONG Length,PLARGE_INTEGER ByteOffset,PULONG Key))
  312. MAKE_HEADER(ULONG,_cdecl,_NtKernGetWorkerThread,(ULONG ThreadType))
  313. MAKE_HEADER(NTSTATUS,_stdcall,_NtKernLoadDriver,(PUNICODE_STRING DriverServiceName))
  314. MAKE_HEADER(VOID,_stdcall,_NtKernQueueWorkItem,(PWORK_QUEUE_ITEM workitem,WORK_QUEUE_TYPE worktype))
  315. MAKE_HEADER(DWORD,_cdecl,_NtKernPhysicalDeviceObjectToDevNode,(PDEVICE_OBJECT PhysicalDeviceObject))
  316. MAKE_HEADER(NTSTATUS,_stdcall,_NtKernSetPhysicalCacheTypeRange,(ULONG BaseAddressHigh, ULONG BaseAddressLow, ULONG NumberOfBytex, ULONG CacheType))
  317. MAKE_HEADER(PDRIVER_OBJECT,_cdecl,_NtKernWin9XLoadDriver,(PCHAR FileName,PCHAR RegisteryPath))
  318. MAKE_HEADER(NTSTATUS,_stdcall,_NtKernCancelIoFile,(HANDLE FileHandle,PIO_STATUS_BLOCK IoStatusBlock))
  319. #endif // _NTKERN_H
  320. #ifdef _SHELL_H
  321. typedef DWORD SHELL_HINSTANCE;
  322. typedef PVOID SHELL_FARPROC;
  323. WORD VXDINLINE
  324. SHELL_Get_Version(VOID)
  325. {
  326. WORD w;
  327. Touch_Register(eax)
  328. VxDCall(SHELL_Get_Version);
  329. _asm mov [w], ax
  330. return(w);
  331. }
  332. MAKE_HEADER(DWORD,_stdcall,SHELL_SYSMODAL_Message, (HVM hvm, DWORD dwMBFlags, PCHAR pszMessage, PCHAR pszCaption))
  333. #ifndef WIN31COMPAT
  334. MAKE_HEADER(APPY_HANDLE,_cdecl,_SHELL_CallAtAppyTime, (APPY_CALLBACK pfnAppyCallBack, DWORD dwRefData, DWORD flAppy, ...))
  335. MAKE_HEADER(BOOL,_cdecl,_SHELL_CancelAppyTimeEvent, (APPY_HANDLE appy_handle))
  336. MAKE_HEADER(BOOL,_cdecl,_SHELL_QueryAppyTimeAvailable, (VOID))
  337. MAKE_HEADER(DWORD,_cdecl,_SHELL_LocalAllocEx, (DWORD fl, DWORD cb, PVOID lpvBuf))
  338. MAKE_HEADER(DWORD,_cdecl,_SHELL_LocalFree, (DWORD hdata))
  339. MAKE_HEADER(DWORD,_cdecl,_SHELL_CallDll, (PCHAR lpszDll, PCHAR lpszProcName, DWORD cbArgs, PVOID lpvArgs))
  340. MAKE_HEADER(DWORD,_cdecl,_SHELL_BroadcastSystemMessage, (DWORD dwFlags, PDWORD lpdwRecipients, DWORD uMsg, DWORD wparam, DWORD lparam))
  341. MAKE_HEADER(SYSBHOOK_HANDLE,_cdecl,_SHELL_HookSystemBroadcast, (SYSBHOOK_CALLBACK pfnSysBHookCallBack, DWORD dwRefData, DWORD dwCallOrder))
  342. MAKE_HEADER(VOID,_cdecl,_SHELL_UnhookSystemBroadcast, (SYSBHOOK_HANDLE SysBHookHandle))
  343. MAKE_HEADER(SHELL_HINSTANCE,_cdecl,_SHELL_LoadLibrary, (PCHAR pszDll))
  344. MAKE_HEADER(VOID,_cdecl,_SHELL_FreeLibrary, (SHELL_HINSTANCE hinstance))
  345. MAKE_HEADER(SHELL_FARPROC,_cdecl,_SHELL_GetProcAddress, (SHELL_HINSTANCE hinstance, PCHAR pszProcName))
  346. #ifdef WIN41SERVICES
  347. MAKE_HEADER(PSHELL_SUUAE_INFO,_cdecl,_SHELL_Update_User_Activity_Ex, (ULONG ulFlags))
  348. #endif
  349. #endif // WIN31COMPAT
  350. #endif // _SHELL_H
  351. #ifdef _PCCARD_H
  352. MAKE_HEADER(DWORD,_cdecl,_PCCARD_Access_CIS_Memory, (DWORD dnDevNode, PUCHAR pBuffer, DWORD dwOffset, DWORD dwLength, DWORD fFlags))
  353. #endif
  354. #ifdef _VTD_H
  355. #ifndef WIN31COMPAT
  356. MAKE_HEADER(DWORD,_stdcall,VTD_GetTimeZoneBias, (VOID))
  357. MAKE_HEADER(ULONGLONG,_cdecl,VTD_Get_Real_Time, (VOID))
  358. MAKE_HEADER(VOID,_cdecl,_VTD_Delay_Ex,(ULONG us, ULONG ulFlags))
  359. #endif // WIN31COMPAT
  360. #endif // _VTD_H
  361. #ifdef _VMMREG_H
  362. #ifndef WIN31COMPAT
  363. MAKE_HEADER(VMMREGRET,cdecl,_RegOpenKey, (VMMHKEY hkey, PCHAR lpszSubKey, PVMMHKEY phkResult))
  364. MAKE_HEADER(VMMREGRET,cdecl,_RegCloseKey, (VMMHKEY hkey))
  365. MAKE_HEADER(VMMREGRET,cdecl,_RegCreateKey, (VMMHKEY hkey, PCHAR lpszSubKey, PVMMHKEY phkResult))
  366. MAKE_HEADER(VMMREGRET,cdecl,_RegDeleteKey, (VMMHKEY hkey, PCHAR lpszSubKey))
  367. MAKE_HEADER(VMMREGRET,cdecl,_RegEnumKey, (VMMHKEY hkey, DWORD iSubKey, PCHAR lpszName, DWORD cchName))
  368. MAKE_HEADER(VMMREGRET,cdecl,_RegQueryValue, (VMMHKEY hkey, PCHAR lpszSubKey, PCHAR lpszValue, PDWORD lpcbValue))
  369. MAKE_HEADER(VMMREGRET,cdecl,_RegSetValue, (VMMHKEY hkey, PCHAR lpszSubKey, DWORD fdwType, PCHAR lpszData, DWORD cbData))
  370. MAKE_HEADER(VMMREGRET,cdecl,_RegDeleteValue, (VMMHKEY hkey, PCHAR lpszValue))
  371. MAKE_HEADER(VMMREGRET,cdecl,_RegEnumValue, (VMMHKEY hkey, DWORD iValue, PCHAR lpszValue, PDWORD lpcbValue, PDWORD lpdwReserved, PDWORD lpdwType, PVOID lpbData, PDWORD lpcbData))
  372. MAKE_HEADER(VMMREGRET,cdecl,_RegQueryValueEx, (VMMHKEY hkey, PCHAR lpszValueName, PDWORD lpdwReserved, PDWORD lpdwType, PVOID lpbData, PDWORD lpcbData))
  373. MAKE_HEADER(VMMREGRET,cdecl,_RegSetValueEx, (VMMHKEY hkey, PCHAR lpszValueName, DWORD dwReserved, DWORD fdwType, PVOID lpbData, DWORD cbData))
  374. MAKE_HEADER(VMMREGRET,cdecl,_RegFlushKey, (VMMHKEY hkey))
  375. MAKE_HEADER(VMMREGRET,cdecl,_RegQueryInfoKey, (VMMHKEY hkey, PCHAR lpszClass, PDWORD lpcchClass,PDWORD lpdwReserved, PDWORD lpcSubKeys, PDWORD lpcchMaxSubKey, PDWORD lpcchMaxClass, \
  376. PDWORD lpcValues, PDWORD lpcchMaxValueName, PDWORD lpcbMaxValueData,PDWORD lpcbSecurityDesc, PDWORD lpftLastWriteTime))
  377. MAKE_HEADER(VMMREGRET,cdecl,_RegRemapPreDefKey, (VMMHKEY hkey,VMMHKEY hkRootKey))
  378. MAKE_HEADER(ULONG,cdecl,_GetRegistryPath, (PVMMDDB ThisDDB, PVOID pUserBuff, ULONG ulUserBuffSize))
  379. MAKE_HEADER(VMMREGRET,cdecl,_GetRegistryKey, (DWORD dwType, PCHAR lpszDevName, DWORD dwFlags, PVMMHKEY lpHkey))
  380. MAKE_HEADER(VMMREGRET,cdecl,_RegCreateDynKey, (PCHAR lpszSubKey, PVOID pvKeyContext, PVOID pprovHandlerInfo, PVOID ppvalueValueInfo, DWORD cpvalueValueInfo, PVMMHKEY phkResult))
  381. MAKE_HEADER(VMMREGRET,cdecl,_RegQueryMultipleValues, (VMMHKEY hKey,PVOID val_list,DWORD num_vals, PCHAR lpValueBuf, DWORD *ldwTotsize))
  382. #endif // WIN31COMPAT
  383. #endif // _VWWREG_H
  384. #ifdef _VPICD_H
  385. MAKE_HEADER(HIRQ,_stdcall,VPICD_Virtualize_IRQ, (PVID pvid))
  386. MAKE_HEADER(VOID,_stdcall,VPICD_Phys_EOI, (HIRQ hirq))
  387. MAKE_HEADER(VOID,_stdcall,VPICD_Physically_Mask, (HIRQ hirq))
  388. MAKE_HEADER(VOID,_stdcall,VPICD_Physically_Unmask, (HIRQ hirq))
  389. MAKE_HEADER(VOID,_stdcall,VPICD_Force_Default_Behavior, (HIRQ hirq))
  390. MAKE_HEADER(VOID,_cdecl,_VPICD_Clear_IR_Bits, (DWORD dwIRQMask))
  391. MAKE_HEADER(WORD,_cdecl,_VPICD_Get_Level_Mask, (VOID))
  392. MAKE_HEADER(VOID,_cdecl,_VPICD_Set_Level_Mask, (WORD wIRQMask))
  393. MAKE_HEADER(VOID,_cdecl,_VPICD_Set_Irql_Mask, (DWORD dwNewLevel))
  394. MAKE_HEADER(VOID,_cdecl,_VPICD_Set_Channel_Irql, (DWORD dwChannel, DWORD dwNewLevel))
  395. MAKE_HEADER(ULONG,_cdecl,_VPICD_Register_Trigger_Handler, (VPICDTRIGGERHANDLER vthHandler, ULONG ulMBZ))
  396. #endif // _VPICD_H
  397. #ifdef _VXDLDR_H
  398. typedef struct DeviceInfo *PDEVICEINFO;
  399. typedef PDEVICEINFO *PPDEVICEINFO;
  400. WORD VXDINLINE
  401. VXDLDR_GetVersion(VOID)
  402. {
  403. WORD w;
  404. Touch_Register(eax)
  405. VxDCall(VXDLDR_GetVersion);
  406. _asm mov [w], ax
  407. return(w);
  408. }
  409. MAKE_HEADER(VXDLDRRET,_stdcall,VXDLDR_LoadDevice, (PPVMMDDB ppDDB, PPDEVICEINFO ppDeviceHandle, PCHAR Filename, BOOL InitDevice))
  410. MAKE_HEADER(VXDLDRRET,_stdcall,VXDLDR_UnloadDevice, (USHORT DevID, PCHAR szName))
  411. MAKE_HEADER(VXDLDRRET,_stdcall,VXDLDR_DevInitSucceeded, (PDEVICEINFO DeviceHandle))
  412. MAKE_HEADER(VXDLDRRET,_stdcall,VXDLDR_DevInitFailed, (PDEVICEINFO DeviceHandle))
  413. MAKE_HEADER(PDEVICEINFO,_cdecl,VXDLDR_GetDeviceList, (VOID))
  414. MAKE_HEADER(VXDLDRRET,_stdcall,VXDLDR_UnloadMe, (USHORT DevID, PCHAR szName))
  415. MAKE_HEADER(LRESULT,_cdecl,_PELDR_LoadModule, (PHPEMODULE phl, PSTR pFileName, PHLIST phetl));
  416. MAKE_HEADER(HPEMODULE,_cdecl,_PELDR_GetModuleHandle, (PSTR pFileName));
  417. MAKE_HEADER(LRESULT,_cdecl,_PELDR_GetModuleUsage, (HPEMODULE hl));
  418. MAKE_HEADER(PFN,_cdecl,_PELDR_GetEntryPoint, (HPEMODULE hl));
  419. MAKE_HEADER(PFN,_cdecl,_PELDR_GetProcAddress, (HPEMODULE hl, PVOID pFuncName, PHLIST phetl));
  420. MAKE_HEADER(LRESULT,_cdecl,_PELDR_LoadModuleEx, (PHPEMODULE phl, PSTR pFileName, PHLIST phetl, DWORD dwFlags));
  421. MAKE_HEADER(LRESULT,_cdecl,_PELDR_InitCompleted, (HPEMODULE hl));
  422. MAKE_HEADER(LRESULT,_cdecl,_PELDR_AddExportTable, (PHPEEXPORTTABLE pht, PSTR pszModuleName, \
  423. ULONG cExportedFunctions, ULONG cExportedNames, ULONG ulOrdinalBase, PVOID *pExportNameList, \
  424. PUSHORT pExportOrdinals, PFN *ppExportAddrs, PHLIST phetl));
  425. MAKE_HEADER(LRESULT,_cdecl,_PELDR_RemoveExportTable, (HPEEXPORTTABLE ht, PHLIST phetl));
  426. MAKE_HEADER(LRESULT,_cdecl,_PELDR_FreeModule, (HPEMODULE hl, PHLIST phetl));
  427. #endif // _VXDLDR_H
  428. #ifdef _VCOMM_H
  429. WORD VXDINLINE
  430. VCOMM_Get_Version(VOID)
  431. {
  432. WORD w;
  433. Touch_Register(eax)
  434. VxDCall(VCOMM_Get_Version);
  435. _asm mov [w], ax
  436. return(w);
  437. }
  438. // VCOMM headers
  439. #ifndef HPORT
  440. #define HPORT DWORD
  441. #endif
  442. MAKE_HEADER(BOOL, _cdecl, _VCOMM_Register_Port_Driver, (PFN InitFn))
  443. MAKE_HEADER(ULONG, _cdecl, _VCOMM_Acquire_Port, (HANDLE PHandle, ULONG PortNum, ULONG OwnerVM, ULONG flags, char *PortName))
  444. MAKE_HEADER(void, _cdecl, _VCOMM_Release_Port,(ULONG PortHandle, ULONG OwnerVM))
  445. MAKE_HEADER(HPORT, _cdecl, _VCOMM_OpenComm, (char *PortName, ULONG VMId))
  446. MAKE_HEADER(BOOL, _cdecl, _VCOMM_SetCommState, (HPORT hPort, _DCB *pDcb, DWORD ActionMask))
  447. MAKE_HEADER(BOOL, _cdecl, _VCOMM_GetCommState, (HPORT hPort, _DCB *pDcb))
  448. MAKE_HEADER(BOOL, _cdecl, _VCOMM_SetupComm, (HPORT hPort,BYTE *RxBase, ULONG RxLength, BYTE *TxBase, ULONG TxLength, _QSB *pqsb))
  449. MAKE_HEADER(BOOL, _cdecl, _VCOMM_TransmitCommChar, (HPORT hPort, char ch))
  450. MAKE_HEADER(BOOL, _cdecl, _VCOMM_CloseComm, (HPORT hPort))
  451. MAKE_HEADER(BOOL, _cdecl, _VCOMM_GetCommQueueStatus, (HPORT hPort, _COMSTAT *pComStat))
  452. MAKE_HEADER(BOOL, _cdecl, _VCOMM_ClearCommError, (HPORT hPort, _COMSTAT *pComstat, ULONG *perror))
  453. MAKE_HEADER(BOOL, _cdecl, _VCOMM_GetModemStatus, (HPORT hPort, ULONG *pModemStatus))
  454. MAKE_HEADER(BOOL, _cdecl, _VCOMM_GetCommProperties, (HPORT hPort, _COMMPROP *pCommprop))
  455. MAKE_HEADER(BOOL, _cdecl, _VCOMM_EscapeCommFunction, (HPORT hPort, long lFunc, long IData, long OData))
  456. // MAKE_HEADER(BOOL, _cdecl, _VCOMM_DeviceIOControl, (HPORT hPort, long IOCTL, long IData, long cbIData, long OData, long cbOData, long *cbBytesReturned))
  457. MAKE_HEADER(BOOL, _cdecl, _VCOMM_PurgeComm, (HPORT hPort, long QueueType))
  458. MAKE_HEADER(BOOL, _cdecl, _VCOMM_SetCommEventMask, (HPORT hPort, long EvtMask, long *dwEvents))
  459. MAKE_HEADER(BOOL, _cdecl, _VCOMM_GetCommEventMask, (HPORT hPort, long EvtMaskToClear, long *dwEvents))
  460. MAKE_HEADER(BOOL, _cdecl, _VCOMM_WriteComm, (HPORT hPort, char *lpBuf, ULONG ToWrite,ULONG *Written))
  461. MAKE_HEADER(BOOL, _cdecl, _VCOMM_ReadComm, (HPORT hPort, char *lpBuf, long ToRead, long *Read))
  462. MAKE_HEADER(BOOL, _cdecl, _VCOMM_EnableCommNotification, (HPORT hPort, PVOID Fn, long ReferenceData))
  463. MAKE_HEADER(DWORD, _cdecl, _VCOMM_GetLastError, (HPORT hPort))
  464. MAKE_HEADER(BOOL, _cdecl, _VCOMM_Steal_Port, (ULONG PortHandle, ULONG VMHandle))
  465. MAKE_HEADER(BOOL, _cdecl, _VCOMM_SetReadCallBack, (HPORT hPort, ULONG RecvTrigger, PVOID FnReadEvent, ULONG RefData))
  466. MAKE_HEADER(BOOL, _cdecl, _VCOMM_SetWriteCallBack, (HPORT hPort,ULONG SendTrigger, PVOID FnWriteEvent, ULONG RefData))
  467. MAKE_HEADER(BOOL, _cdecl, _VCOMM_Add_Port, (DWORD refData, PFN PortEntry, char *PortName))
  468. #ifndef WIN31COMPAT
  469. MAKE_HEADER(BOOL, _cdecl, _VCOMM_GetSetCommTimeouts, (HPORT hPort, LPCOMMTIMEOUTS lpct, DWORD dwAction))
  470. MAKE_HEADER(IORequest * , _cdecl, _VCOMM_SetWriteRequest, (HPORT hPort, IORequest *ioreq, ULONG *lpNumWritten))
  471. MAKE_HEADER(IORequest *, _cdecl, _VCOMM_SetReadRequest, (HPORT hPort,IORequest *ioreq, ULONG *lpNumRead))
  472. MAKE_HEADER(BOOL, _cdecl, _VCOMM_Dequeue_Request,(DWORD listElement, PDWORD lpcbTransfer))
  473. MAKE_HEADER(DWORD, _cdecl, _VCOMM_Enumerate_DevNodes, (void))
  474. MAKE_HEADER(PFN, _cdecl, _VCOMM_Get_Contention_Handler, (char *PortName))
  475. MAKE_HEADER(DWORD, _cdecl, _VCOMM_Map_Name_To_Resource, (char *PortName))
  476. #endif
  477. #endif // _VCOMM_H
  478. #ifdef _IRS_H
  479. MAKE_HEADER(void, _cdecl, IOS_Requestor_Service, (ULONG p))
  480. #endif // _IRS_H
  481. #ifdef _INC_VPOWERD
  482. WORD VXDINLINE
  483. VPOWERD_Get_Version(VOID)
  484. {
  485. WORD w;
  486. Touch_Register(eax)
  487. VxDCall(_VPOWERD_Get_Version);
  488. _asm mov [w], ax
  489. return(w);
  490. }
  491. MAKE_HEADER(DWORD, _cdecl, _VPOWERD_Get_APM_BIOS_Version, (VOID))
  492. MAKE_HEADER(DWORD, _cdecl, _VPOWERD_Get_Power_Management_Level, (VOID))
  493. MAKE_HEADER(POWERRET, _cdecl, _VPOWERD_Set_Power_Management_Level, (DWORD Power_Management_Level))
  494. MAKE_HEADER(POWERRET, _cdecl, _VPOWERD_Set_Device_Power_State, (POWER_DEVICE_ID Power_Device_ID, POWER_STATE Power_State))
  495. MAKE_HEADER(POWERRET, _cdecl, _VPOWERD_Restore_Power_On_Defaults, (VOID))
  496. MAKE_HEADER(POWERRET, _cdecl, _VPOWERD_Get_Power_Status, (POWER_DEVICE_ID Power_Device_ID, LPPOWER_STATUS pPower_Status))
  497. #ifndef _NTDDK_
  498. MAKE_HEADER(POWERRET, _cdecl, _VPOWERD_Get_Power_State, (POWER_DEVICE_ID Power_Device_ID, LPPOWER_STATE pPower_State))
  499. MAKE_HEADER(POWERRET, _cdecl, _VPOWERD_Set_System_Power_State, (POWER_STATE Power_State, DWORD Request_Type))
  500. #else
  501. MAKE_HEADER(VOID, _cdecl, _VPOWERD_Transfer_Control, (PVTC_INFO pvtc))
  502. MAKE_HEADER(POWERRET, _cdecl, _VPOWERD_Set_System_Power_State, (VXD_POWER_STATE Power_State, DWORD Request_Type))
  503. #endif
  504. MAKE_HEADER(VOID, _cdecl, _VPOWERD_OEM_APM_Function, (VOID))
  505. MAKE_HEADER(POWERRET, _cdecl, _VPOWERD_Register_Power_Handler, (POWER_HANDLER Power_Handler, DWORD Priority))
  506. MAKE_HEADER(POWERRET, _cdecl, _VPOWERD_Deregister_Power_Handler, (POWER_HANDLER Power_Handler));
  507. #endif // _INC_VPOWERD
  508. #ifdef _ACPIVXD_H
  509. #ifndef _ACPIVXD_SERVICES_PROVIDER
  510. WORD VXDINLINE
  511. ACPI_Get_Version(VOID)
  512. {
  513. WORD w;
  514. Touch_Register(eax)
  515. VxDCall(ACPI_GetVersion);
  516. _asm mov [w], ax
  517. return(w);
  518. }
  519. MAKE_HEADER(BOOL, _cdecl, _ACPI_SetTimingMode, (DEVNODE IDEChannelDevnode, PTIMINGMODE TimingMode, ULONG Drive0IDEBlockLength, PVOID Drive0IDEBlock, ULONG Drive1IDEBlockLength, PVOID Drive1IDEBlock))
  520. #ifdef _NTDDK_
  521. MAKE_HEADER(BOOL, _cdecl, _ACPI_SetSystemPowerState, (SYSTEM_POWER_STATE PowerState))
  522. #endif
  523. MAKE_HEADER(BOOL, _cdecl, _ACPI_RegisterOpRegionCookedHandler, (OPREGIONHANDLER pCallBack, ULONG Type, ULONG Context))
  524. #ifdef _NTDDK_
  525. MAKE_HEADER(BOOL, _cdecl, _ACPI_Set_RTC, (PTIME_FIELDS TimeFields))
  526. #endif
  527. MAKE_HEADER(BOOL, _cdecl, _ACPI_GetTimingMode, (DEVNODE Channel, PTIMINGMODE TimingMode))
  528. MAKE_HEADER(BOOL, _cdecl, _ACPI_GetTaskFile, (DEVNODE Drive, PVOID ATACommandBuffer, PULONG ReturnedBufferSize))
  529. #ifdef _AMLI_H
  530. MAKE_HEADER(PNSOBJ, _cdecl, _ACPI_WalkNameSpace, (PNSOBJ pnsObj, ULONG ulDirection))
  531. MAKE_HEADER(PNSOBJ, _cdecl, _ACPI_GetObject, (PNSOBJ pnsObj, ULONG ulPackedID))
  532. MAKE_HEADER(DEVNODE, _cdecl, _ACPI_NameSpaceToDevNode, (PNSOBJ pnsObj))
  533. MAKE_HEADER(PNSOBJ, _cdecl, _ACPI_DevNodeToNameSpace, (DEVNODE dnDevNode))
  534. MAKE_HEADER(BOOL, _cdecl, _ACPI_RunControlMethod, (PNSOBJ pnsObj, ULONG ulParamCount, POBJDATA pParams, DWORD dwExpectedType, PDWORD pdwBufferSize, PVOID pBuffer))
  535. #endif
  536. #ifdef _AMLI_H
  537. MAKE_HEADER(BOOL, _cdecl, _ACPI_EvalPackageElement, (PNSOBJ pns, int iPktIndex, POBJDATA pResult))
  538. MAKE_HEADER(BOOL, _cdecl, _ACPI_EvalPkgDataElement, (POBJDATA pdataPkg, int iPkgIndex, POBJDATA pdataResult))
  539. MAKE_HEADER(VOID, _cdecl, _ACPI_FreeDataBuffs, (POBJDATA pdata, int icData))
  540. MAKE_HEADER(PNSOBJ, _cdecl, _ACPI_GetNameSpaceObject, (PSZ pszObjPath, PNSOBJ pnsScope, PPNSOBJ ppns, ULONG dwfFlags))
  541. #endif
  542. #endif // _ACPIVXD_SERVICES_PROVIDER
  543. #endif // _ACPIVXD_H
  544. #ifdef _VDMAD_H_
  545. MAKE_HEADER(ULONG, _stdcall, VDMAD_Get_Phys_Count, (HDMA hdma, HVM hvm))
  546. MAKE_HEADER(VOID, _stdcall, VDMAD_Phys_Mask_Channel, (HDMA hdma))
  547. MAKE_HEADER(VOID, _stdcall, VDMAD_Phys_Unmask_Channel, (HDMA hdma, HVM hvm))
  548. MAKE_HEADER(VOID, _stdcall, VDMAD_Set_Phys_State( HDMA hdma, HVM hVM, ULONG ulMode, ULONG ulExtMode ))
  549. MAKE_HEADER(VOID, _stdcall, VDMAD_Set_Region_Info, (HDMA hdma, ULONG ulBufferId, BOOLEAN fLocked, ULONG ulLinear, ULONG cbSize, ULONG ulPhysical))
  550. MAKE_HEADER(VOID, _stdcall, VDMAD_Unvirtualize_Channel, (HDMA hdma))
  551. MAKE_HEADER(HDMA, _stdcall, VDMAD_Virtualize_Channel, (ULONG ulChannel, PVOID pHandler))
  552. #endif // _VDMAD_H_
  553. #ifdef _VWIN32_H_
  554. #ifdef NOBASEDEFS
  555. MAKE_HEADER(ULONG, _cdecl, VWIN32_AllocExternalHandle, (PR0OBJTYPETABLE, PVOID, PHANDLE, ULONG))
  556. MAKE_HEADER(VOID, _cdecl, VWIN32_UseExternalHandle, (HANDLE))
  557. MAKE_HEADER(VOID, _cdecl, VWIN32_UnuseExternalHandle, (HANDLE))
  558. MAKE_HEADER(DWORD, _stdcall, VWIN32_ConvertNtTimeout, (PLARGE_INTEGER))
  559. MAKE_HEADER(VOID, _cdecl, VWIN32_SetWin32EventBoostPriority, (PVOID, PULONG))
  560. MAKE_HEADER(ULONG, _cdecl, VWIN32_GetCurThreadCondition, (ULONG))
  561. #define VWIN32_AllocExternalHandle PREPEND(VWIN32_AllocExternalHandle)
  562. #define VWIN32_UseExternalHandle PREPEND(VWIN32_UseExternalHandle)
  563. #define VWIN32_UnuseExternalHandle PREPEND(VWIN32_UnuseExternalHandle)
  564. #define VWIN32_ConvertNtTimeout PREPEND(VWIN32_ConvertNtTimeout)
  565. #define VWIN32_SetWin32EventBoostPriority PREPEND(VWIN32_SetWin32EventBoostPriority)
  566. #define VWIN32_GetCurThreadCondition PREPEND(VWIN32_GetCurThreadCondition)
  567. #endif // NOBASEDEFS
  568. #endif // _VWIN32_H_
  569. #define _MapPhysToLinear PREPEND(_MapPhysToLinear)
  570. #define _HeapAllocate PREPEND(_HeapAllocate)
  571. #define _HeapFree PREPEND(_HeapFree)
  572. #define _HeapReAllocate PREPEND(_HeapReAllocate)
  573. #define _HeapGetSize PREPEND(_HeapGetSize)
  574. #define _Trace_Out_Service PREPEND(_Trace_Out_Service)
  575. #define _Debug_Out_Service PREPEND(_Debug_Out_Service)
  576. #define _Debug_Flags_Service PREPEND(_Debug_Flags_Service)
  577. #define _Debug_Printf_Service PREPEND(_Debug_Printf_Service)
  578. #define Fatal_Error_Handler PREPEND(Fatal_Error_Handler)
  579. #define Begin_Critical_Section PREPEND(Begin_Critical_Section)
  580. #define Schedule_Global_Event PREPEND(Schedule_Global_Event)
  581. #define Cancel_Global_Event PREPEND(Cancel_Global_Event)
  582. #define Get_Sys_VM_Handle PREPEND(Get_Sys_VM_Handle)
  583. #define Get_Profile_Hex_Int PREPEND(Get_Profile_Hex_Int)
  584. #define Get_Profile_Boolean PREPEND(Get_Profile_Boolean)
  585. #define Create_Semaphore PREPEND(Create_Semaphore)
  586. #define Destroy_Semaphore PREPEND(Destroy_Semaphore)
  587. #define Signal_Semaphore PREPEND(Signal_Semaphore)
  588. #define Wait_Semaphore PREPEND(Wait_Semaphore)
  589. #define Get_Execution_Focus PREPEND(Get_Execution_Focus)
  590. #define Set_VM_Time_Out PREPEND(Set_VM_Time_Out)
  591. #define Set_Global_Time_Out PREPEND(Set_Global_Time_Out)
  592. #define Cancel_Time_Out PREPEND(Cancel_Time_Out)
  593. #define Update_System_Clock PREPEND(Update_System_Clock)
  594. #define Set_Async_Time_Out PREPEND(Set_Async_Time_Out)
  595. #define Get_Last_Updated_System_Time PREPEND(Get_Last_Updated_System_Time)
  596. #define List_Allocate PREPEND(List_Allocate)
  597. #define List_Attach PREPEND(List_Attach)
  598. #define List_Attach_Tail PREPEND(List_Attach_Tail)
  599. #define List_Create PREPEND(List_Create)
  600. #define List_Deallocate PREPEND(List_Deallocate)
  601. #define List_Destroy PREPEND(List_Destroy)
  602. #define List_Get_First PREPEND(List_Get_First)
  603. #define List_Get_Next PREPEND(List_Get_Next)
  604. #define List_Insert PREPEND(List_Insert)
  605. #define List_Remove PREPEND(List_Remove)
  606. #define List_Remove_First PREPEND(List_Remove_First)
  607. #define Get_DDB PREPEND(Get_DDB)
  608. #define Directed_Sys_Control PREPEND(Directed_Sys_Control)
  609. #define Install_Exeption_Handler PREPEND(Install_Exeption_Handler)
  610. #define _Assert_Range PREPEND(_Assert_Range)
  611. #define _Sprintf PREPEND(_Sprintf)
  612. #define _PageAllocate PREPEND(_PageAllocate)
  613. #define _PageFree PREPEND(_PageFree)
  614. #define _PageReserve PREPEND(_PageReserve)
  615. #define _PageCommit PREPEND(_PageCommit)
  616. #define _PageDecommit PREPEND(_PageDecommit)
  617. #define _AddFreePhysPage PREPEND(_AddFreePhysPage)
  618. #define Get_Cur_VM_Handle PREPEND(Get_Cur_VM_Handle)
  619. #define _CreateMutex PREPEND(_CreateMutex)
  620. #define _DestroyMutex PREPEND(_DestroyMutex)
  621. #define _EnterMutex PREPEND(_EnterMutex)
  622. #define _GetMutexOwner PREPEND(_GetMutexOwner)
  623. #define _LeaveMutex PREPEND(_LeaveMutex)
  624. #define _SignalID PREPEND(_SignalID)
  625. #define _BlockOnID PREPEND(_BlockOnID)
  626. #define _lstrcpyn PREPEND(_lstrcpyn)
  627. #define _lstrlen PREPEND(_lstrlen)
  628. #define _lmemcpy PREPEND(_lmemcpy)
  629. #define VMM_GetSystemInitState PREPEND(VMM_GetSystemInitState)
  630. #define Get_Boot_Flags PREPEND(Get_Boot_Flags)
  631. #define Get_Cur_Thread_Handle PREPEND(Get_Cur_Thread_Handle)
  632. #define _GetVxDName PREPEND(_GetVxDName)
  633. #define _Call_On_My_Stack PREPEND(_Call_On_My_Stack)
  634. #define _LinPageLock PREPEND(_LinPageLock)
  635. #define _LinPageUnLock PREPEND(_LinPageUnLock)
  636. #define _Allocate_Device_CB_Area PREPEND(_Allocate_Device_CB_Area)
  637. #define Hook_V86_Int_Chain PREPEND(Hook_V86_Int_Chain)
  638. #define Unhook_V86_Int_Chain PREPEND(Unhook_V86_Int_Chain)
  639. #define Get_Next_VM_Handle PREPEND(Get_Next_VM_Handle)
  640. #define Test_Cur_VM_Handle PREPEND(Test_Cur_VM_Handle)
  641. #define Test_Sys_VM_Handle PREPEND(Test_Sys_VM_Handle)
  642. #define _PageCommitPhys PREPEND(_PageCommitPhys)
  643. #define Open_Boot_Log PREPEND(Open_Boot_Log)
  644. #define Close_Boot_Log PREPEND(Close_Boot_Log)
  645. #define Write_Boot_Log PREPEND(Write_Boot_Log)
  646. #define _CopyPageTable PREPEND(_CopyPageTable)
  647. #define _PhysIntoV86 PREPEND(_PhysIntoV86)
  648. #define _LinMapIntoV86 PREPEND(_LinMapIntoV86)
  649. #define _ModifyPageBits PREPEND(_ModifyPageBits)
  650. #define _PageReAllocate PREPEND(_PageReAllocate)
  651. #define VMM_Add_DDB PREPEND(VMM_Add_DDB)
  652. #define VMM_Remove_DDB PREPEND(VMM_Remove_DDB)
  653. #define _AtEventTime PREPEND(_AtEventTime)
  654. #define Call_Restricted_Event PREPEND(Call_Restricted_Event)
  655. #define Cancel_Restricted_Event PREPEND(Cancel_Restricted_Event)
  656. #define _Free_Temp_V86_Data_Area PREPEND(_Free_Temp_V86_Data_Area)
  657. #define _Allocate_Temp_V86_Data_Area PREPEND(_Allocate_Temp_V86_Data_Area)
  658. #define _GetNulPageHandle PREPEND(_GetNulPageHandle)
  659. #define _RegisterGARTHandler PREPEND(_RegisterGARTHandler)
  660. #define _GARTReserve PREPEND(_GARTReserve)
  661. #define _GARTCommit PREPEND(_GARTCommit)
  662. #define _GARTUnCommit PREPEND(_GARTUnCommit)
  663. #define _GARTFree PREPEND(_GARTFree)
  664. #define _GARTMemAttributes PREPEND(_GARTMemAttributes)
  665. #define _FlushCaches PREPEND(_FlushCaches)
  666. #define _Set_Global_Time_Out_Ex PREPEND(_Set_Global_Time_Out_Ex)
  667. #define _AllocateThreadDataSlot PREPEND(_AllocateThreadDataSlot)
  668. #define _FreeThreadDataSlot PREPEND(_FreeThreadDataSlot)
  669. #define Get_Next_Thread_Handle PREPEND(Get_Next_Thread_Handle)
  670. #define Get_Machine_Info PREPEND(Get_Machine_Info)
  671. #define _PageModifyPermissions PREPEND(_PageModifyPermissions)
  672. #define _CallRing3 PREPEND(_CallRing3)
  673. #define _NtKernCreateFile PREPEND(_NtKernCreateFile)
  674. #define _NtKernClose PREPEND(_NtKernClose)
  675. #define _NtKernReadFile PREPEND(_NtKernReadFile)
  676. #define _NtKernWriteFile PREPEND(_NtKernWriteFile)
  677. #define _NtKernDeviceIoControl PREPEND(_NtKernDeviceIoControl)
  678. #define _NtKernGetWorkerThread PREPEND(_NtKernGetWorkerThread)
  679. #define _NtKernLoadDriver PREPEND(_NtKernLoadDriver)
  680. #define _NtKernQueueWorkItem PREPEND(_NtKernQueueWorkItem)
  681. #define _NtKernPhysicalDeviceObjectToDevNode PREPEND(_NtKernPhysicalDeviceObjectToDevNode)
  682. #define _NtKernSetPhysicalCacheTypeRange PREPEND(_NtKernSetPhysicalCacheTypeRange)
  683. #define _NtKernWin9XLoadDriver PREPEND(_NtKernWin9XLoadDriver)
  684. #define _SHELL_CallAtAppyTime PREPEND(_SHELL_CallAtAppyTime)
  685. #define _SHELL_CancelAppyTimeEvent PREPEND(_SHELL_CancelAppyTimeEvent)
  686. #define _SHELL_QueryAppyTimeAvailable PREPEND(_SHELL_QueryAppyTimeAvailable)
  687. #define _SHELL_LocalAllocEx PREPEND(_SHELL_LocalAllocEx)
  688. #define _SHELL_LocalFree PREPEND(_SHELL_LocalFree)
  689. #define _SHELL_CallDll PREPEND(_SHELL_CallDll)
  690. #define _SHELL_BroadcastSystemMessage PREPEND(_SHELL_BroadcastSystemMessage)
  691. #define _SHELL_HookSystemBroadcast PREPEND(_SHELL_HookSystemBroadcast)
  692. #define _SHELL_UnhookSystemBroadcast PREPEND(_SHELL_UnhookSystemBroadcast)
  693. #define _SHELL_LoadLibrary PREPEND(_SHELL_LoadLibrary)
  694. #define _SHELL_FreeLibrary PREPEND(_SHELL_FreeLibrary)
  695. #define _SHELL_GetProcAddress PREPEND(_SHELL_GetProcAddress)
  696. #define SHELL_SYSMODAL_Message PREPEND(SHELL_SYSMODAL_Message)
  697. #define _SHELL_Update_User_Activity_Ex PREPEND(_SHELL_Update_User_Activity_Ex)
  698. #define _RegOpenKey PREPEND(_RegOpenKey)
  699. #define _RegCloseKey PREPEND(_RegCloseKey)
  700. #define _RegCreateKey PREPEND(_RegCreateKey)
  701. #define _RegCreateDynKey PREPEND(_RegCreateDynKey)
  702. #define _RegQueryMultipleValues PREPEND(_RegQueryMultipleValues)
  703. #define _RegDeleteKey PREPEND(_RegDeleteKey)
  704. #define _RegEnumKey PREPEND(_RegEnumKey)
  705. #define _RegQueryValue PREPEND(_RegQueryValue)
  706. #define _RegSetValue PREPEND(_RegSetValue)
  707. #define _RegDeleteValue PREPEND(_RegDeleteValue)
  708. #define _RegEnumValue PREPEND(_RegEnumValue)
  709. #define _RegQueryValueEx PREPEND(_RegQueryValueEx)
  710. #define _RegSetValueEx PREPEND(_RegSetValueEx)
  711. #define _RegFlushKey PREPEND(_RegFlushKey)
  712. #define _RegQueryInfoKey PREPEND(_RegQueryInfoKey)
  713. #define _RegRemapPreDefKey PREPEND(_RegRemapPreDefKey)
  714. #define _GetRegistryPath PREPEND(_GetRegistryPath)
  715. #define _GetRegistryKey PREPEND(_GetRegistryKey)
  716. #define Get_Config_Directory PREPEND(Get_Config_Directory)
  717. #define _Call_On_My_Not_Flat_Stack PREPEND(_Call_On_My_Not_Flat_Stack)
  718. #define _LinRegionLock PREPEND(_LinRegionLock)
  719. #define _LinRegionUnLock PREPEND(_LinRegionUnLock)
  720. #define _AttemptingSomethingDangerous PREPEND(_AttemptingSomethingDangerous)
  721. #define _Vsprintf PREPEND(_Vsprintf)
  722. #ifndef PCI_WITH_PCIMP
  723. #define _PCI_Read_Config PREPEND(_PCI_Read_Config)
  724. #define _PCI_Write_Config PREPEND(_PCI_Write_Config)
  725. #define _PCI_Lock_Unlock PREPEND(_PCI_Lock_Unlock)
  726. #endif // PCI_WITH_PCIMP
  727. #ifdef _VTD_H
  728. #ifndef _VTD_SERVICES_PROVIDER
  729. #define VTD_GetTimeZoneBias PREPEND(VTD_GetTimeZoneBias)
  730. #define VTD_Get_Real_Time PREPEND(VTD_Get_Real_Time)
  731. #define VTD_Delay_Ex PREPEND(VTD_Delay_Ex)
  732. #endif
  733. #endif
  734. #ifndef _PCCARD_SERVICES_PROVIDER
  735. #define _PCCARD_Access_CIS_Memory PREPEND(_PCCARD_Access_CIS_Memory)
  736. #endif
  737. #define MTRRSetPhysicalCacheTypeRange PREPEND(MTRRSetPhysicalCacheTypeRange)
  738. #define VPICD_Virtualize_IRQ PREPEND(VPICD_Virtualize_IRQ)
  739. #define VPICD_Phys_EOI PREPEND(VPICD_Phys_EOI)
  740. #define VPICD_Physically_Mask PREPEND(VPICD_Physically_Mask)
  741. #define VPICD_Physically_Unmask PREPEND(VPICD_Physically_Unmask)
  742. #define VPICD_Force_Default_Behavior PREPEND(VPICD_Force_Default_Behavior)
  743. #define _VPICD_Clear_IR_Bits PREPEND(_VPICD_Clear_IR_Bits)
  744. #define _VPICD_Get_Level_Mask PREPEND(_VPICD_Get_Level_Mask)
  745. #define _VPICD_Set_Level_Mask PREPEND(_VPICD_Set_Level_Mask)
  746. #define _VPICD_Set_Irql_Mask PREPEND(_VPICD_Set_Irql_Mask)
  747. #define _VPICD_Set_Channel_Irql PREPEND(_VPICD_Set_Channel_Irql)
  748. #define _VPICD_Register_Trigger_Handler PREPEND(_VPICD_Register_Trigger_Handler)
  749. #define _ACPI_SetTimingMode PREPEND(_ACPI_SetTimingMode)
  750. #define _ACPI_SetSystemPowerState PREPEND(_ACPI_SetSystemPowerState)
  751. #define _ACPI_RegisterOpRegionCookedHandler PREPEND(_ACPI_RegisterOpRegionCookedHandler)
  752. #define _ACPI_Set_RTC PREPEND(_ACPI_Set_RTC)
  753. #define _ACPI_GetTimingMode PREPEND(_ACPI_GetTimingMode)
  754. #define _ACPI_GetTaskFile PREPEND(_ACPI_GetTaskFile)
  755. #define _ACPI_WalkNameSpace PREPEND(_ACPI_WalkNameSpace)
  756. #define _ACPI_GetObject PREPEND(_ACPI_GetObject)
  757. #define _ACPI_NameSpaceToDevNode PREPEND(_ACPI_NameSpaceToDevNode)
  758. #define _ACPI_DevNodeToNameSpace PREPEND(_ACPI_DevNodeToNameSpace)
  759. #define _ACPI_RunControlMethod PREPEND(_ACPI_RunControlMethod)
  760. #define _ACPI_EvalPackageElement PREPEND(_ACPI_EvalPackageElement)
  761. #define _ACPI_EvalPkgDataElement PREPEND(_ACPI_EvalPkgDataElement)
  762. #define _ACPI_FreeDataBuffs PREPEND(_ACPI_FreeDataBuffs)
  763. #define _ACPI_GetNameSpaceObject PREPEND(_ACPI_GetNameSpaceObject)
  764. #define VXDLDR_LoadDevice PREPEND(VXDLDR_LoadDevice)
  765. #define VXDLDR_UnloadDevice PREPEND(VXDLDR_UnloadDevice)
  766. #define VXDLDR_DevInitSucceeded PREPEND(VXDLDR_DevInitSucceeded)
  767. #define VXDLDR_DevInitFailed PREPEND(VXDLDR_DevInitFailed)
  768. #define VXDLDR_GetDeviceList PREPEND(VXDLDR_GetDeviceList)
  769. #define _PELDR_LoadModule PREPEND(_PELDR_LoadModule)
  770. #define _PELDR_GetModuleHandle PREPEND(_PELDR_GetModuleHandle)
  771. #define _PELDR_GetModuleUsage PREPEND(_PELDR_GetModuleUsage)
  772. #define _PELDR_GetEntryPoint PREPEND(_PELDR_GetEntryPoint)
  773. #define _PELDR_GetProcAddress PREPEND(_PELDR_GetProcAddress)
  774. #define _PELDR_AddExportTable PREPEND(_PELDR_AddExportTable)
  775. #define _PELDR_RemoveExportTable PREPEND(_PELDR_RemoveExportTable)
  776. #define _PELDR_FreeModule PREPEND(_PELDR_FreeModule)
  777. #define _PELDR_InitCompleted PREPEND(_PELDR_InitCompleted)
  778. #define _PELDR_LoadModuleEx PREPEND(_PELDR_LoadModuleEx)
  779. #define Get_Exec_Path PREPEND(Get_Exec_Path)
  780. #define CM_Initialize PREPEND(_CONFIGMG_Initialize)
  781. #define CM_Locate_DevNode PREPEND(_CONFIGMG_Locate_DevNode)
  782. #define CM_Get_Parent PREPEND(_CONFIGMG_Get_Parent)
  783. #define CM_Get_Child PREPEND(_CONFIGMG_Get_Child)
  784. #define CM_Get_Sibling PREPEND(_CONFIGMG_Get_Sibling)
  785. #define CM_Get_Device_ID_Size PREPEND(_CONFIGMG_Get_Device_ID_Size)
  786. #define CM_Get_Device_ID PREPEND(_CONFIGMG_Get_Device_ID)
  787. #define CM_Get_Depth PREPEND(_CONFIGMG_Get_Depth)
  788. #define CM_Get_Private_DWord PREPEND(_CONFIGMG_Get_Private_DWord)
  789. #define CM_Set_Private_DWord PREPEND(_CONFIGMG_Set_Private_DWord)
  790. #define CM_Create_DevNode PREPEND(_CONFIGMG_Create_DevNode)
  791. #define CM_Query_Remove_SubTree PREPEND(_CONFIGMG_Query_Remove_SubTree)
  792. #define CM_Remove_SubTree PREPEND(_CONFIGMG_Remove_SubTree)
  793. #define CM_Register_Device_Driver PREPEND(_CONFIGMG_Register_Device_Driver)
  794. #define CM_Register_Enumerator PREPEND(_CONFIGMG_Register_Enumerator)
  795. #define CM_Register_Arbitrator PREPEND(_CONFIGMG_Register_Arbitrator)
  796. #define CM_Deregister_Arbitrator PREPEND(_CONFIGMG_Deregister_Arbitrator)
  797. #define CM_Query_Arbitrator_Free_Size PREPEND(_CONFIGMG_Query_Arbitrator_Free_Size)
  798. #define CM_Query_Arbitrator_Free_Data PREPEND(_CONFIGMG_Query_Arbitrator_Free_Data)
  799. #define CM_Sort_NodeList PREPEND(_CONFIGMG_Sort_NodeList)
  800. #define CM_Yield PREPEND(_CONFIGMG_Yield)
  801. #define CM_Lock PREPEND(_CONFIGMG_Lock)
  802. #define CM_Unlock PREPEND(_CONFIGMG_Unlock)
  803. #define CM_Add_Empty_Log_Conf PREPEND(_CONFIGMG_Add_Empty_Log_Conf)
  804. #define CM_Free_Log_Conf PREPEND(_CONFIGMG_Free_Log_Conf)
  805. #define CM_Get_First_Log_Conf PREPEND(_CONFIGMG_Get_First_Log_Conf)
  806. #define CM_Get_Next_Log_Conf PREPEND(_CONFIGMG_Get_Next_Log_Conf)
  807. #define CM_Add_Res_Des PREPEND(_CONFIGMG_Add_Res_Des)
  808. #define CM_Modify_Res_Des PREPEND(_CONFIGMG_Modify_Res_Des)
  809. #define CM_Free_Res_Des PREPEND(_CONFIGMG_Free_Res_Des)
  810. #define CM_Get_Next_Res_Des PREPEND(_CONFIGMG_Get_Next_Res_Des)
  811. #define CM_Get_Res_Des_Header_Size PREPEND(_CONFIGMG_Get_Res_Des_Header_Size)
  812. #define CM_Get_Res_Des_Data_Size PREPEND(_CONFIGMG_Get_Res_Des_Data_Size)
  813. #define CM_Get_Res_Des_Data PREPEND(_CONFIGMG_Get_Res_Des_Data)
  814. #define CM_Process_Events_Now PREPEND(_CONFIGMG_Process_Events_Now)
  815. #define CM_Create_Range_List PREPEND(_CONFIGMG_Create_Range_List)
  816. #define CM_Add_Range PREPEND(_CONFIGMG_Add_Range)
  817. #define CM_Delete_Range PREPEND(_CONFIGMG_Delete_Range)
  818. #define CM_Test_Range_Available PREPEND(_CONFIGMG_Test_Range_Available)
  819. #define CM_Dup_Range_List PREPEND(_CONFIGMG_Dup_Range_List)
  820. #define CM_Free_Range_List PREPEND(_CONFIGMG_Free_Range_List)
  821. #define CM_Invert_Range_List PREPEND(_CONFIGMG_Invert_Range_List)
  822. #define CM_Intersect_Range_List PREPEND(_CONFIGMG_Intersect_Range_List)
  823. #define CM_First_Range PREPEND(_CONFIGMG_First_Range)
  824. #define CM_Next_Range PREPEND(_CONFIGMG_Next_Range)
  825. #define CM_Dump_Range_List PREPEND(_CONFIGMG_Dump_Range_List)
  826. #define CM_Load_DLVxDs PREPEND(_CONFIGMG_Load_DLVxDs)
  827. #define CM_Get_DDBs PREPEND(_CONFIGMG_Get_DDBs)
  828. #define CM_Get_CRC_CheckSum PREPEND(_CONFIGMG_Get_CRC_CheckSum)
  829. #define CM_Register_DevLoader PREPEND(_CONFIGMG_Register_DevLoader)
  830. #define CM_Reenumerate_DevNode PREPEND(_CONFIGMG_Reenumerate_DevNode)
  831. #define CM_Setup_DevNode PREPEND(_CONFIGMG_Setup_DevNode)
  832. #define CM_Reset_Children_Marks PREPEND(_CONFIGMG_Reset_Children_Marks)
  833. #define CM_Get_DevNode_Status PREPEND(_CONFIGMG_Get_DevNode_Status)
  834. #define CM_Remove_Unmarked_Children PREPEND(_CONFIGMG_Remove_Unmarked_Children)
  835. #define CM_ISAPNP_To_CM PREPEND(_CONFIGMG_ISAPNP_To_CM)
  836. #define CM_CallBack_Device_Driver PREPEND(_CONFIGMG_CallBack_Device_Driver)
  837. #define CM_CallBack_Enumerator PREPEND(_CONFIGMG_CallBack_Enumerator)
  838. #define CM_Get_Alloc_Log_Conf PREPEND(_CONFIGMG_Get_Alloc_Log_Conf)
  839. #define CM_Get_DevNode_Key_Size PREPEND(_CONFIGMG_Get_DevNode_Key_Size)
  840. #define CM_Get_DevNode_Key PREPEND(_CONFIGMG_Get_DevNode_Key)
  841. #define CM_Read_Registry_Value PREPEND(_CONFIGMG_Read_Registry_Value)
  842. #define CM_Write_Registry_Value PREPEND(_CONFIGMG_Write_Registry_Value)
  843. #define CM_Disable_DevNode PREPEND(_CONFIGMG_Disable_DevNode)
  844. #define CM_Enable_DevNode PREPEND(_CONFIGMG_Enable_DevNode)
  845. #define CM_Move_DevNode PREPEND(_CONFIGMG_Move_DevNode)
  846. #define CM_Set_Bus_Info PREPEND(_CONFIGMG_Set_Bus_Info)
  847. #define CM_Get_Bus_Info PREPEND(_CONFIGMG_Get_Bus_Info)
  848. #define CM_Set_HW_Prof PREPEND(_CONFIGMG_Set_HW_Prof)
  849. #define CM_Recompute_HW_Prof PREPEND(_CONFIGMG_Recompute_HW_Prof)
  850. #define CM_Get_Device_Driver_Private_DWord PREPEND(_CONFIGMG_Get_Device_Driver_Private_DWord)
  851. #define CM_Set_Device_Driver_Private_DWord PREPEND(_CONFIGMG_Set_Device_Driver_Private_DWord)
  852. #define CM_Query_Change_HW_Prof PREPEND(_CONFIGMG_Query_Change_HW_Prof)
  853. #define CM_Get_HW_Prof_Flags PREPEND(_CONFIGMG_Get_HW_Prof_Flags)
  854. #define CM_Set_HW_Prof_Flags PREPEND(_CONFIGMG_Set_HW_Prof_Flags)
  855. #define CM_Read_Registry_Log_Confs PREPEND(_CONFIGMG_Read_Registry_Log_Confs)
  856. #define CM_Run_Detection PREPEND(_CONFIGMG_Run_Detection)
  857. #define CM_Call_At_Appy_Time PREPEND(_CONFIGMG_Call_At_Appy_Time)
  858. #define CM_Fail_Change_HW_Prof PREPEND(_CONFIGMG_Fail_Change_HW_Prof)
  859. #define CM_Set_Private_Problem PREPEND(_CONFIGMG_Set_Private_Problem)
  860. #define CM_Debug_DevNode PREPEND(_CONFIGMG_Debug_DevNode)
  861. #define CM_Get_Hardware_Profile_Info PREPEND(_CONFIGMG_Get_Hardware_Profile_Info)
  862. #define CM_Register_Enumerator_Function PREPEND(_CONFIGMG_Register_Enumerator_Function)
  863. #define CM_Call_Enumerator_Function PREPEND(_CONFIGMG_Call_Enumerator_Function)
  864. #define CM_Add_ID PREPEND(_CONFIGMG_Add_ID)
  865. #define CM_Find_Range PREPEND(_CONFIGMG_Find_Range)
  866. #define CM_Get_Global_State PREPEND(_CONFIGMG_Get_Global_State)
  867. #define CM_Broadcast_Device_Change_Message PREPEND(_CONFIGMG_Broadcast_Device_Change_Message)
  868. #define CM_Call_DevNode_Handler PREPEND(_CONFIGMG_Call_DevNode_Handler)
  869. #define CM_Remove_Reinsert_All PREPEND(_CONFIGMG_Remove_Reinsert_All)
  870. //
  871. // OPK2 Services
  872. //
  873. #define CM_Change_DevNode_Status PREPEND(_CONFIGMG_Change_DevNode_Status)
  874. #define CM_Reprocess_DevNode PREPEND(_CONFIGMG_Reprocess_DevNode)
  875. #define CM_Assert_Structure PREPEND(_CONFIGMG_Assert_Structure)
  876. #define CM_Discard_Boot_Log_Conf PREPEND(_CONFIGMG_Discard_Boot_Log_Conf)
  877. #define CM_Set_Dependent_DevNode PREPEND(_CONFIGMG_Set_Dependent_DevNode)
  878. #define CM_Get_Dependent_DevNode PREPEND(_CONFIGMG_Get_Dependent_DevNode)
  879. #define CM_Refilter_DevNode PREPEND(_CONFIGMG_Refilter_DevNode)
  880. #define CM_Merge_Range_List PREPEND(_CONFIGMG_Merge_Range_List);
  881. #define CM_Substract_Range_List PREPEND(_CONFIGMG_Substract_Range_List);
  882. #define CM_Set_DevNode_PowerState PREPEND(_CONFIGMG_Set_DevNode_PowerState)
  883. #define CM_Get_DevNode_PowerState PREPEND(_CONFIGMG_Get_DevNode_PowerState)
  884. #define CM_Set_DevNode_PowerCapabilities PREPEND(_CONFIGMG_Set_DevNode_PowerCapabilities)
  885. #define CM_Get_DevNode_PowerCapabilities PREPEND(_CONFIGMG_Get_DevNode_PowerCapabilities)
  886. #define CM_Read_Range_List PREPEND(_CONFIGMG_Read_Range_List)
  887. #define CM_Write_Range_List PREPEND(_CONFIGMG_Write_Range_List)
  888. #define CM_Get_Set_Log_Conf_Priority PREPEND(_CONFIGMG_Get_Set_Log_Conf_Priority)
  889. #define CM_Support_Share_Irq PREPEND(_CONFIGMG_Support_Share_Irq)
  890. #define CM_Get_Parent_Structure PREPEND(_CONFIGMG_Get_Parent_Structure)
  891. //
  892. // 4.1 Services
  893. //
  894. #define CM_Register_DevNode_For_Idle_Detection PREPEND(_CONFIGMG_Register_DevNode_For_Idle_Detection)
  895. #define CM_CM_To_ISAPNP PREPEND(_CONFIGMG_CM_To_ISAPNP)
  896. #define CM_Get_DevNode_Handler PREPEND(_CONFIGMG_Get_DevNode_Handler)
  897. #define CM_Detect_Resource_Conflict PREPEND(_CONFIGMG_Detect_Resource_Conflict)
  898. #define CM_Get_Interface_Device_List PREPEND(_CONFIGMG_Get_Interface_Device_List)
  899. #define CM_Get_Interface_Device_List_Size PREPEND(_CONFIGMG_Get_Interface_Device_List_Size)
  900. #define CM_Get_Conflict_Info PREPEND(_CONFIGMG_Get_Conflict_Info)
  901. #define CM_Add_Remove_DevNode_Property PREPEND(_CONFIGMG_Add_Remove_DevNode_Property)
  902. #define CM_CallBack_At_Appy_Time PREPEND(_CONFIGMG_CallBack_At_Appy_Time)
  903. #define CM_Register_Interface_Device PREPEND(_CONFIGMG_Register_Interface_Device)
  904. #define CM_System_Device_Power_State_Mapping PREPEND(_CONFIGMG_System_Device_Power_State_Mapping)
  905. #define CM_Get_Arbitrator_Info PREPEND(_CONFIGMG_Get_Arbitrator_Info)
  906. #define CM_Waking_Up_From_DevNode PREPEND(_CONFIGMG_Waking_Up_From_DevNode)
  907. #define CM_Set_DevNode_Problem PREPEND(_CONFIGMG_Set_DevNode_Problem)
  908. #ifdef _VCOMM_H
  909. #define VCOMM_Register_Port_Driver PREPEND(_VCOMM_Register_Port_Driver)
  910. #define VCOMM_Acquire_Port PREPEND(_VCOMM_Acquire_Port)
  911. #define VCOMM_Release_Port PREPEND(_VCOMM_Release_Port)
  912. #define VCOMM_OpenComm PREPEND(_VCOMM_OpenComm)
  913. #define VCOMM_SetCommState PREPEND(_VCOMM_SetCommState)
  914. #define VCOMM_GetCommState PREPEND(_VCOMM_GetCommState)
  915. #define VCOMM_SetupComm PREPEND(_VCOMM_SetupComm)
  916. #define VCOMM_TransmitCommChar PREPEND(_VCOMM_TransmitCommChar)
  917. #define VCOMM_CloseComm PREPEND(_VCOMM_CloseComm)
  918. #define VCOMM_GetCommQueueStatus PREPEND(_VCOMM_GetCommQueueStatus)
  919. #define VCOMM_ClearCommError PREPEND(_VCOMM_ClearCommError)
  920. #define VCOMM_GetModemStatus PREPEND(_VCOMM_GetModemStatus)
  921. #define VCOMM_GetCommProperties PREPEND(_VCOMM_GetCommProperties)
  922. #define VCOMM_EscapeCommFunction PREPEND(_VCOMM_EscapeCommFunction)
  923. // #define VCOMM_DeviceIOControl PREPEND(_VCOMM_DeviceIOControl)
  924. #define VCOMM_PurgeComm PREPEND(_VCOMM_PurgeComm)
  925. #define VCOMM_SetCommEventMask PREPEND(_VCOMM_SetCommEventMask)
  926. #define VCOMM_GetCommEventMask PREPEND(_VCOMM_GetCommEventMask)
  927. #define VCOMM_WriteComm PREPEND(_VCOMM_WriteComm)
  928. #define VCOMM_ReadComm PREPEND(_VCOMM_ReadComm)
  929. #define VCOMM_EnableCommNotification PREPEND(_VCOMM_EnableCommNotification)
  930. #define VCOMM_GetLastError PREPEND(_VCOMM_GetLastError)
  931. #define VCOMM_Steal_Port PREPEND(_VCOMM_Steal_Port)
  932. #define VCOMM_SetReadCallBack PREPEND(_VCOMM_SetReadCallBack)
  933. #define VCOMM_SetWriteCallBack PREPEND(_VCOMM_SetWriteCallBack)
  934. #define VCOMM_Add_Port PREPEND(_VCOMM_Add_Port)
  935. #ifndef WIN31COMPAT
  936. #define VCOMM_GetSetCommTimeouts PREPEND(_VCOMM_GetSetCommTimeouts)
  937. #define VCOMM_SetWriteRequest PREPEND(_VCOMM_SetWriteRequest)
  938. #define VCOMM_SetReadRequest PREPEND(_VCOMM_SetReadRequest)
  939. #define VCOMM_Dequeue_Request PREPEND(_VCOMM_Dequeue_Request)
  940. #define VCOMM_Enumerate_DevNodes PREPEND(_VCOMM_Enumerate_DevNodes)
  941. #define VCOMM_Get_Contention_Handler PREPEND(_VCOMM_Get_Contention_Handler)
  942. #define VCOMM_Map_Name_To_Resource PREPEND(_VCOMM_Map_Name_To_Resource)
  943. #endif
  944. #endif // _VCOMM_H
  945. #ifdef _IRS_H
  946. #define IOS_Requestor_Service PREPEND(IOS_Requestor_Service)
  947. #endif // _IRS_H
  948. #ifdef _INC_VPOWERD
  949. #define _VPOWERD_Get_APM_BIOS_Version PREPEND(_VPOWERD_Get_APM_BIOS_Version)
  950. #define _VPOWERD_Get_Power_Management_Level PREPEND(_VPOWERD_Get_Power_Management_Level)
  951. #define _VPOWERD_Set_Power_Management_Level PREPEND(_VPOWERD_Set_Power_Management_Level)
  952. #define _VPOWERD_Set_Device_Power_State PREPEND(_VPOWERD_Set_Device_Power_State)
  953. #define _VPOWERD_Set_System_Power_State PREPEND(_VPOWERD_Set_System_Power_State)
  954. #define _VPOWERD_Restore_Power_On_Defaults PREPEND(_VPOWERD_Restore_Power_On_Defaults)
  955. #define _VPOWERD_Get_Power_Status PREPEND(_VPOWERD_Get_Power_Status)
  956. #define _VPOWERD_Transfer_Control PREPEND(_VPOWERD_Transfer_Control)
  957. #define _VPOWERD_Get_Power_State PREPEND(_VPOWERD_Get_Power_State)
  958. #define _VPOWERD_OEM_APM_Function PREPEND(_VPOWERD_OEM_APM_Function)
  959. #define _VPOWERD_Register_Power_Handler PREPEND(_VPOWERD_Register_Power_Handler)
  960. #define _VPOWERD_Deregister_Power_Handler PREPEND(_VPOWERD_Deregister_Power_Handler)
  961. #endif // _INC_VPOWERD
  962. #ifdef _VDMAD_H_
  963. #define VDMAD_Get_Phys_Count PREPEND(VDMAD_Get_Phys_Count)
  964. #define VDMAD_Phys_Mask_Channel PREPEND(VDMAD_Phys_Mask_Channel)
  965. #define VDMAD_Phys_Unmask_Channel PREPEND(VDMAD_Phys_Unmask_Channel)
  966. #define VDMAD_Set_Phys_State PREPEND(VDMAD_Set_Phys_State)
  967. #define VDMAD_Set_Region_Info PREPEND(VDMAD_Set_Region_Info)
  968. #define VDMAD_Unvirtualize_Channel PREPEND(VDMAD_Unvirtualize_Channel)
  969. #define VDMAD_Virtualize_Channel PREPEND(VDMAD_Virtualize_Channel)
  970. #endif // _VDMAD_H_
  971. #ifdef USECMDWRAPPERS
  972. struct _CMDDEBUGCOMMAND {
  973. CHAR cLetter;
  974. VOID (_cdecl *pFunction)(VOID);
  975. PCHAR pszShortName;
  976. PCHAR pszExplanation;
  977. };
  978. typedef struct _CMDDEBUGCOMMAND CMDDC;
  979. typedef CMDDC *PCMDDC;
  980. #define CMDD _Debug_Printf_Service
  981. #define CMD_LOCAL _fastcall
  982. /****************************************************************************
  983. *
  984. * CMDInChar - Get a character from the debug terminal
  985. *
  986. * ENTRY: None.
  987. *
  988. * EXIT: ASCII character.
  989. *
  990. ***************************************************************************/
  991. CHAR CMD_LOCAL
  992. CMDInChar(VOID);
  993. /****************************************************************************
  994. *
  995. * CMDMenu - Display standard menu
  996. *
  997. * ENTRY: pszVxDName is the name of the VxD which wants this debugger.
  998. *
  999. * pdcDebugCommands are the various debug commands.
  1000. *
  1001. * EXIT: None.
  1002. *
  1003. ***************************************************************************/
  1004. VOID CMD_LOCAL
  1005. CMDMenu(PCHAR pszVxDName, PCMDDC pdcDebugCommands);
  1006. /****************************************************************************
  1007. *
  1008. * CMDReadNumber - Returns an hex number read from the debug terminal
  1009. *
  1010. * ENTRY: pszQuestion is the prompt (can be NULL).
  1011. *
  1012. * bNumDigits is the number of hex digits of maximum input (1-8).
  1013. *
  1014. * fAppendCrLf is TRUE if a carriage return is wanted after the
  1015. * input.
  1016. *
  1017. * EXIT: A DWORD being the inputted value.
  1018. *
  1019. ***************************************************************************/
  1020. DWORD CMD_LOCAL
  1021. CMDReadNumber(PCHAR pszQuestion, BYTE bNumDigits, BOOL fAppendCrLf);
  1022. /***LP CMDGetString - Read a string from the debug terminal
  1023. *
  1024. * ENTRY
  1025. * pszPrompt -> prompt string
  1026. * pszBuff -> buffer to hold the string
  1027. * dwcbLen - buffer length
  1028. * fUpper - TRUE if convert to upper case
  1029. *
  1030. * EXIT
  1031. * returns the number of characters read including the terminating newline.
  1032. */
  1033. DWORD CMD_LOCAL
  1034. CMDGetString(PCHAR pszPrompt, PCHAR pszBuff, DWORD dwcbLen, BOOL fUpper);
  1035. #endif // USECMDWRAPPERS
  1036. #endif // _VXDWRAPS_H