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.

66 lines
1.6 KiB

  1. /****************************************************************************
  2. *
  3. * thunk.h
  4. *
  5. * macros, defines, prototypes for avicap 16:32 thunks
  6. *
  7. * Copyright (c) 1994 - 1997 Microsoft Corporation. All Rights Reserved.
  8. *
  9. ***************************************************************************/
  10. #ifndef _THUNK_H
  11. #define _THUNK_H
  12. typedef LPVOID P16VOID;
  13. typedef DWORD P32VOID;
  14. //#define P16VOID LPVOID
  15. //#define P32VOID DWORD
  16. #include "common.h"
  17. // thunk helpers exported from the kernel
  18. //
  19. DWORD WINAPI GetCurrentProcessID(void); // KERNEL
  20. DWORD WINAPI SetWin32Event(DWORD hEvent); // KERNEL
  21. P16VOID WINAPI MapLS(P32VOID);
  22. P16VOID WINAPI UnMapLS(P16VOID);
  23. P32VOID WINAPI MapSL(P16VOID);
  24. // thunk helpers in thunka.asm
  25. //
  26. DWORD FAR PASCAL capTileBuffer (
  27. DWORD dwLinear,
  28. DWORD dwSize);
  29. #define PTR_FROM_TILE(dwTile) (LPVOID)(dwTile & 0xFFFF0000)
  30. void FAR PASCAL capUnTileBuffer (
  31. DWORD dwTileInfo);
  32. BOOL FAR PASCAL capPageFree (
  33. DWORD dwMemHandle);
  34. typedef struct _cpa_data {
  35. DWORD dwMemHandle;
  36. DWORD dwPhysAddr;
  37. } CPA_DATA, FAR * LPCPA_DATA;
  38. DWORD FAR PASCAL capPageAllocate ( // returns ptr to allocated memory
  39. DWORD dwFlags,
  40. DWORD dwPageCount,
  41. DWORD dwMaxPhysPageMask,
  42. LPCPA_DATA pcpad); // returned mem handle & phys address
  43. // flags for capPageAllocate, same as flags from vmm.inc
  44. //
  45. #define PageUseAlign 0x00000002
  46. #define PageContig 0x00000004
  47. #define PageFixed 0x00000008
  48. #ifdef WIN32
  49. void NTAPI ThunkTerm(void);
  50. BOOL NTAPI ThunkInit(void);
  51. #endif
  52. #endif