Old fashion design for PC-104
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.

126 lines
5.2 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: k32exp.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of K32EXP.H
  13. //----------------------------------------------------------------------------
  14. /*
  15. K32EXP.H -- Get32ProcAddress
  16. Win32 code to import by ordinal from KERNEL32.DLL in Windows 95
  17. Andrew Schulman
  18. Senior editor, O'Reilly & Associates (Sebastopol CA)
  19. andrew@ora.com
  20. August 1995
  21. See K32EXP.C for more information
  22. */
  23. // KERNEL32.1 through KERNEL32.9 are all VxDCall
  24. #define VXDCALL_ORD 1
  25. // found these by examining RUNDLL32.EXE
  26. #define LOADLIBRARY16_ORD 35
  27. #define FREELIBRARY16_ORD 36
  28. #define GETPROCADDRESS16_ORD 37
  29. // found these by examining WOW32.DLL
  30. // actually, these are documented: see GENTHUNK.TXT ("Windows NT
  31. // Generic Thunk Overview") and WOWNT32.H in Microsoft's Win32 SDK
  32. #define WOWCallback16_ORD 54
  33. #define WOWCallback16Ex_ORD 55
  34. #define WOWGetVDMPointer_ORD 56
  35. #define WOWHandle32_ORD 57
  36. #define WOWHandle16_ORD 58
  37. #define WOWGlobalAlloc16_ORD 59
  38. #define WOWGlobalLock16_ORD 60
  39. #define WOWGlobalUnlock16_ORD 61
  40. #define WOWGlobalFree16_ORD 62
  41. #define WOWGlobalAllocLock16_ORD 63
  42. #define WOWGlobalUnlockFree16_ORD 64
  43. #define WOWGlobalLockSize16_ORD 65
  44. #define WOWYield16_ORD 66
  45. #define WOWDirectedYield16_ORD 67
  46. #define WOWGetVDMPointerFix_ORD 68
  47. #define WOWGetVDMPointerUnfix_ORD 69
  48. #define WOW32_1_ORD 70
  49. // found these by examining NTDLL.DLL (Win95)
  50. #define RtlLargeIntegerAdd_ORD 72
  51. #define RtlEnlargedIntegerMultiply_ORD 73
  52. #define RtlEnlargedUnsignedMultiply_ORD 74
  53. #define RtlEnlargedUnsignedDivide_ORD 75
  54. #define RtlExtendedLargeIntegerDivide_ORD 76
  55. #define RtlExtendedMagicDivide_ORD 77
  56. #define RtlExtendedIntegerMultiply_ORD 78
  57. #define RtlLargeIntegerShiftLeft_ORD 79
  58. #define RtlLargeIntegerShiftRight_ORD 80
  59. #define RtlLargeIntegerArithmeticShift_ORD 81
  60. #define RtlLargeIntegerNegate_ORD 82
  61. #define RtlLargeIntegerSubtract_ORD 83
  62. #define RtlConvertLongToLargeInteger_ORD 84
  63. #define RtlConvertUlongToLargeInteger_ORD 85
  64. #define GETPWIN16LOCK_ORD 93
  65. #define ENTERSYSLEVEL_ORD 97
  66. #define LEAVESYSLEVEL_ORD 98
  67. DWORD WINAPI GetK32ProcAddress(int ord);
  68. // VxDCall is probably the most important undocumented Win32 API
  69. DWORD (WINAPI *VxDCall)(DWORD srvc, DWORD eax, DWORD ecx);
  70. // Walking VxD chain shows that these are the VxDs that provide
  71. // Win32 services
  72. #define VMM_ID 0x0001 // 41 services
  73. #define REBOOT_ID 0x0009 // 2
  74. #define VNETBIOS_ID 0x0014 // 2
  75. #define VWIN32_ID 0x002A // 79
  76. #define VCOMM_ID 0x002B // 27
  77. #define VCOND_ID 0x0038 // 53 -- Virtual CON (Console)
  78. // found these by examining ADVAPI32.DLL and REGSERV.EXE
  79. // REGSERV.EXE calls these directly for remote registry services
  80. #define RegOpenKeyEx_CALL 0x10011
  81. #define RegCreatKeyA_CALL 0x10012
  82. #define RegCloseKey_CALL 0x10013
  83. #define RegDeleteKey_CALL 0x10014
  84. #define RegSetValueA_CALL 0x10015
  85. #define RegDeleteValueA_CALL 0x10016
  86. #define RegQueryValueA_CALL 0x10017
  87. #define RegEnumKeyA_CALL 0x10018
  88. #define RegQueryValueEx_CALL 0x1001A
  89. #define RegSetValueExA_CALL 0x1001B
  90. #define RegFlushKey_CALL 0x1001C
  91. #define RegLoadKeyA_CALL 0x10021
  92. #define RegUnloadKeyA_CALL 0x10022
  93. #define RegSaveKeyA_CALL 0x10023
  94. #define RegRemapPreDefKey_CALL 0x10024
  95. #define RegQueryMultipleValuesA_CALL 0x10026
  96. #define RegReplaceKeyA_CALL 0x10027
  97. // two important VWIN32 services
  98. #define VWIN32_INT21_CALL 0x2A0010
  99. #define VWIN32_INT31_CALL 0x2A0029
  100. #define DosCall(eax, ecx) VxDCall(VWIN32_INT21_CALL, (eax), (ecx))
  101. #define DPMICall(eax, ecx) VxDCall(VWIN32_INT31_CALL, (eax), (ecx))
  102. // other undocumented interfaces
  103. HINSTANCE (WINAPI *LoadLibrary16)(LPCSTR lpLibFileName);
  104. int (WINAPI *FreeLibrary16)(HINSTANCE hModule);
  105. FARPROC (WINAPI *GetProcAddress16)(HINSTANCE hModule, LPCSTR lpProcName);
  106. void (WINAPI *GetpWin16Lock)(DWORD *pWin16Lock);
  107. // int (WINAPI *_ConfirmWin16Lock)(void); // returns current lock count
  108. void (WINAPI *_EnterSysLevel)(DWORD lock);
  109. void (WINAPI *_LeaveSysLevel)(DWORD lock);