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.

48 lines
1.2 KiB

  1. ////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // File: shim2.h
  4. //
  5. // History: Mar-00 a-batjar Created.
  6. //
  7. // Desc: Contains common declarations for shim2
  8. //
  9. //
  10. ////////////////////////////////////////////////////////////////////////////////////
  11. //defined in shim2.c used by init.c GetHookApis.
  12. //loads the shim dll and initializes global structures necessary to hook
  13. extern BOOL _LoadPatchDll(LPWSTR szPatchDll,LPSTR szCmdLine,LPSTR szModToPatch);
  14. //defined in shim2.c used by init.c GetHookApis
  15. //shim2's hook mechanism, redirects import table of the loaded dll to
  16. //shim functions.
  17. extern void __stdcall PatchNewModules( VOID );
  18. //memory patch tags used by mempatch.c and shim2.c
  19. #define SHIM_MP_UNPROCESSED 0x00
  20. #define SHIM_MP_PROCESSED 0x01
  21. #define SHIM_MP_APPLIED 0x02
  22. typedef struct tagSHIM_MEMORY_PATCH
  23. {
  24. LPWSTR pszModule;
  25. DWORD dwOffset;
  26. DWORD dwSize;
  27. LPVOID pOld;
  28. LPVOID pNew;
  29. DWORD dwStatus;
  30. } SHIM_MEMORY_PATCH, *PSHIM_MEMORY_PATCH;
  31. //defined in init.c used by mempatch.c
  32. #define MEMPATCHTAG "PATCH"
  33. //defined in mempatch.c used by shim2.c PatchNewModules
  34. extern void AttemptPatches();