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.

92 lines
2.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: wow32fn.h
  7. //
  8. // Contents: WOW 32-bit private function declarations
  9. //
  10. // History: 18-Feb-94 DrewB Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef __WOW32FN_H__
  14. #define __WOW32FN_H__
  15. //
  16. // WOW types
  17. //
  18. // 'V'DM pointers
  19. typedef DWORD VPVOID;
  20. typedef DWORD VPSTR;
  21. typedef HANDLE HAND32;
  22. typedef WORD HAND16;
  23. typedef HAND16 HMEM16;
  24. typedef HAND16 HWND16;
  25. typedef HAND16 HDC16;
  26. typedef HAND16 HRGN16;
  27. typedef HAND16 HMENU16;
  28. typedef HAND16 HICON16;
  29. typedef HAND16 HBITMAP16;
  30. typedef HAND16 HACCEL16;
  31. typedef HAND16 HTASK16;
  32. typedef HAND16 HMETAFILE16;
  33. #ifdef __cplusplus
  34. extern "C"
  35. {
  36. #endif
  37. // Macros to handle conversion of 16:16 pointers to 0:32 pointers
  38. // On NT this mapping is guaranteed to stay stable in a WOW process
  39. // as long as a 32->16 transition doesn't occur
  40. //
  41. // On Chicago 32-bit code can be preempted at any time so selectors
  42. // must be fixed to protect them from being remapped
  43. #if defined(_CHICAGO_)
  44. #define WOWFIXVDMPTR(vp, cb) WOWGetVDMPointerFix(vp, cb, TRUE)
  45. #define WOWRELVDMPTR(vp) WOWGetVDMPointerUnfix(vp)
  46. #else
  47. #define WOWFIXVDMPTR(vp, cb) WOWGetVDMPointer(vp, cb, TRUE)
  48. #define WOWRELVDMPTR(vp) (vp)
  49. #endif
  50. #define FIXVDMPTR(vp, type) \
  51. (type UNALIGNED *)WOWFIXVDMPTR(vp, sizeof(type))
  52. #define RELVDMPTR(vp) \
  53. WOWRELVDMPTR(vp)
  54. #if !defined(_CHICAGO_)
  55. HAND16 CopyDropFilesFrom32(HANDLE h32);
  56. HANDLE CopyDropFilesFrom16(HAND16 h16);
  57. #endif
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. // 16-bit HGLOBAL tracking functions
  62. #if DBG == 1
  63. VPVOID WgtAllocLock(WORD wFlags, DWORD cb, HMEM16 *ph);
  64. void WgtUnlockFree(VPVOID vpv);
  65. void WgtDump(void);
  66. #else
  67. #define WgtAllocLock(wFlags, cb, ph) \
  68. WOWGlobalAllocLock16(wFlags, cb, ph)
  69. #define WgtUnlockFree(vpv) \
  70. WOWGlobalUnlockFree16(vpv)
  71. #define WgtDump()
  72. #endif
  73. #endif // #ifndef __WOW32FN_H__