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.

65 lines
1.1 KiB

  1. /*
  2. mmiot32.h
  3. Port stuff to convert to win 32
  4. */
  5. #include <stdio.h>
  6. #include <string.h>
  7. #include <windows.h>
  8. #include <mmsystem.h>
  9. #include "MMIOTest.h"
  10. #include "gmem.h"
  11. #ifdef HUGE
  12. #undef HUGE
  13. #endif
  14. #define HUGE
  15. #ifdef huge
  16. #undef huge
  17. #endif
  18. #define huge
  19. #define HPSTR LPSTR
  20. #define READ OF_READ // (Win32)
  21. /*
  22. macros to replace the wincom stuff
  23. */
  24. #define dprintf printf
  25. #define lstrncmp(s,d,n) strncmp((s),(d),(n))
  26. extern void dDbgAssert(LPSTR exp, LPSTR file, int line);
  27. DWORD __dwEval;
  28. #define WinAssert(exp) \
  29. ((exp) ? (void)0 : dDbgAssert(#exp, __FILE__, __LINE__))
  30. /* Evaluate exp. If it's non-zero return it, else ASSERT */
  31. #define WinEval(exp) \
  32. ( __dwEval=(DWORD)(exp), \
  33. __dwEval \
  34. ? (void)0 \
  35. : dDbgAssert(#exp, __FILE__, __LINE__) \
  36. , __dwEval \
  37. )
  38. /*
  39. stuff not in Win32
  40. */
  41. #define AccessResource(hInst, hResInfo) -1