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.

39 lines
1.0 KiB

  1. #ifdef WIN32
  2. // These things have direct equivalents.
  3. #define hmemcpy memmove
  4. #define lstrcpyn strncpy
  5. // Shouldn't be using these things.
  6. #define _huge
  7. #define _export
  8. #define _loadds
  9. #define SELECTOROF(x) ((UINT)(x))
  10. #define OFFSETOF(x) ((UINT)(x))
  11. #define MAKELP(hmem,off) ((LPVOID)((LPBYTE)hmem+off))
  12. #define MAKELRESULTFROMUINT(i) ((LRESULT)i)
  13. #define ISVALIDHINSTANCE(hinst) ((BOOL)hinst)
  14. #define DATASEG_READONLY ".rodata"
  15. #define DATASEG_PERINSTANCE ".instance"
  16. #define DATASEG_SHARED // default (".data")
  17. #define GetWindowInt GetWindowLong
  18. #define SetWindowInt SetWindowLong
  19. #define SetWindowID(hwnd,id) SetWindowLong(hwnd, GWL_ID, id)
  20. #else // WIN32
  21. #define MAKELRESULTFROMUINT(i) MAKELRESULT(i,0)
  22. #define ISVALIDHINSTANCE(hinst) ((UINT)hinst>=HINSTANCE_ERROR)
  23. #define DATASEG_READONLY "_TEXT"
  24. #define DATASEG_PERINSTANCE
  25. #define DATASEG_SHARED
  26. #define GetWindowInt GetWindowWord
  27. #define SetWindowInt SetWindowWord
  28. #define SetWindowID(hwnd,id) SetWindowWord(hwnd, GWW_ID, id)
  29. #endif // WIN32