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.

39 lines
1.5 KiB

  1. ////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // File: shim.h
  4. //
  5. // History: May-99 clupu Created.
  6. // Aug-99 v-johnwh Various bug fixes.
  7. // 23-Nov-99 markder Support for multiple shim DLLs, chaining
  8. // of hooks. General clean-up.
  9. // 11-Feb-00 markder Reverted to W2K shipped shim structures.
  10. //
  11. // Desc: Contains all structure and function definitions for the shim mechanism.
  12. //
  13. ////////////////////////////////////////////////////////////////////////////////////
  14. #ifndef __SHIM_H__
  15. #define __SHIM_H__
  16. typedef struct tagHOOKAPI {
  17. char* pszModule; // the name of the module
  18. char* pszFunctionName; // the name of the API in the module
  19. PVOID pfnNew; // pointer to the new stub API
  20. PVOID pfnOld; // pointer to the old API
  21. DWORD dwFlags; // used internally
  22. struct tagHOOKAPI *pNextHook; // used internally
  23. } HOOKAPI, *PHOOKAPI;
  24. /*
  25. * If the hook DLL ever patches LoadLibraryA/W it must call PatchNewModules
  26. * so that the shim knows to patch any new loaded DLLs
  27. */
  28. typedef VOID (*PFNPATCHNEWMODULES)(VOID);
  29. typedef PHOOKAPI (*PFNGETHOOKAPIS)(LPSTR pszCmdLine,
  30. PFNPATCHNEWMODULES pfnPatchNewModules,
  31. DWORD* pdwHooksCount);
  32. #define SHIM_COMMAND_LINE_MAX_BUFFER 1024
  33. #endif