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.

74 lines
1.4 KiB

  1. /************************* OS Types *************************
  2. /**/
  3. typedef unsigned long TID;
  4. #define handleNil ((HANDLE)(-1))
  5. /* operating system dependent
  6. /**/
  7. #ifdef WIN32
  8. typedef void * HANDLE;
  9. #else
  10. typedef unsigned int HANDLE;
  11. #endif
  12. #define OffsetOf(p) ((ULONG_PTR) p)
  13. #define IndexOf(p) (OffsetOf((ULONG_PTR) p)/sizeof(*(p)))
  14. #define VOID void
  15. #ifndef CHAR
  16. typedef char CHAR;
  17. #endif
  18. typedef unsigned char UCHAR;
  19. typedef unsigned char BYTE;
  20. #ifndef SHORT
  21. typedef short SHORT;
  22. #endif
  23. typedef unsigned short USHORT;
  24. typedef unsigned short WORD;
  25. #ifndef INT
  26. typedef int INT;
  27. #endif
  28. typedef unsigned int UINT;
  29. #if defined(_ALPHA_) || defined(_AXP64_) || defined(_IA64_) || defined(_AMD64_)
  30. #define UNALIGNED __unaligned
  31. #else
  32. #define UNALIGNED
  33. #endif
  34. /************************* SysSetThreadPriority *************************
  35. /**/
  36. #define lThreadPriorityNormal 0
  37. #define lThreadPriorityEnhanced 1
  38. #define lThreadPriorityCritical 2
  39. /**************************** SYSTEM PROVIDED ***************************
  40. /**/
  41. #ifndef _WINDOWS_
  42. #ifdef WIN32
  43. #ifndef LONG
  44. typedef int LONG;
  45. #endif
  46. typedef unsigned ULONG;
  47. typedef unsigned long DWORD;
  48. #else
  49. #ifndef LONG
  50. typedef long LONG;
  51. #endif
  52. typedef unsigned long ULONG;
  53. typedef unsigned long DWORD;
  54. #endif
  55. #undef FILE_BEGIN
  56. #undef FILE_CURRENT
  57. #undef FILE_END
  58. #define FILE_BEGIN 0x0000
  59. #define FILE_CURRENT 0x0001
  60. #define FILE_END 0x0002
  61. #endif