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.

60 lines
1.7 KiB

  1. /*****************************************************************************
  2. *
  3. * DiThunk.h
  4. *
  5. * Copyright (c) 1997-1999 Microsoft Corporation. All Rights Reserved.
  6. *
  7. * Abstract:
  8. *
  9. * Template thunks for Windows 95 device manager.
  10. *
  11. *****************************************************************************/
  12. /*****************************************************************************
  13. *
  14. * dithunk.c
  15. *
  16. *****************************************************************************/
  17. /***************************************************************************
  18. *
  19. * @doc INTERNAL
  20. *
  21. * @struct KERNELPROCADDR |
  22. *
  23. * Kernel procedure addresses.
  24. *
  25. * Careful! This must match dithunk.c::c_rgpszKernel32.
  26. *
  27. ***************************************************************************/
  28. typedef struct KERNELPROCADDR { /* kpa */
  29. /* By ordinal */
  30. HINSTANCE (NTAPI *LoadLibrary16)(LPCSTR);
  31. BOOL (NTAPI *FreeLibrary16)(HINSTANCE);
  32. FARPROC (NTAPI *GetProcAddress16)(HINSTANCE, LPCSTR);
  33. /* By name */
  34. LPVOID (NTAPI *MapLS)(LPVOID);
  35. void (NTAPI *UnMapLS)(LPVOID);
  36. LPVOID (NTAPI *MapSL)(LPVOID);
  37. LPVOID (NTAPI *MapSLFix)(LPVOID);
  38. void (NTAPI *UnMapSLFixArray)(int, LPVOID);
  39. /* Warning: GetKernelProcAddresses assumes that QT_Thunk is last */
  40. void (__cdecl *QT_Thunk)(void);
  41. } KERNELPROCADDR;
  42. extern KERNELPROCADDR g_kpa;
  43. int __cdecl TemplateThunk(FARPROC fp, PCSTR pszSig, ...);
  44. #define MAKELP(sel, ofs) (PV)MAKELPARAM(ofs, sel)
  45. BOOL EXTERNAL Thunk_GetKernelProcAddresses(void);
  46. HINSTANCE EXTERNAL
  47. Thunk_GetProcAddresses(FARPROC *rgfp, LPCSTR *rgpsz,
  48. UINT cfp, LPCSTR pszLibrary);