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.

170 lines
7.0 KiB

  1. /****************************************************************************/
  2. /* adcgbtyp.h */
  3. /* */
  4. /* Basic types - portable */
  5. /* */
  6. /* Copyright (C) 1997-1999 Microsoft Corporation */
  7. /****************************************************************************/
  8. #ifndef _H_ADCGBTYP
  9. #define _H_ADCGBTYP
  10. /****************************************************************************/
  11. /* Include the proxy header. This will then include the appropriate OS */
  12. /* specific header for us. */
  13. /****************************************************************************/
  14. #include <wdcgbtyp.h>
  15. /****************************************************************************/
  16. /* Basic types abstracted from compiler built ins. */
  17. /****************************************************************************/
  18. #ifdef OS_WIN16
  19. typedef short INT16;
  20. typedef unsigned short UINT16;
  21. typedef long INT32;
  22. typedef unsigned long UINT32;
  23. #define UNALIGNED
  24. #endif
  25. typedef unsigned long UNALIGNED FAR *PUINT32_UA;
  26. typedef unsigned short UNALIGNED FAR *PUINT16_UA;
  27. typedef UINT32 *PUINT32;
  28. typedef int DCINT;
  29. typedef signed char DCINT8;
  30. typedef long DCINT32;
  31. typedef unsigned int DCUINT;
  32. typedef unsigned char DCUINT8;
  33. typedef unsigned long DCUINT32;
  34. #ifdef __midl
  35. typedef long DCVOID;
  36. #else
  37. typedef void DCVOID;
  38. #endif
  39. typedef DCUINT DCBOOL;
  40. typedef DCUINT16 DCBOOL16;
  41. typedef DCUINT32 DCBOOL32;
  42. typedef unsigned short UINT16;
  43. #ifdef OS_WIN16
  44. typedef unsigned long UINT32;
  45. #endif
  46. /****************************************************************************/
  47. /* Now derive further convenience types from system specific types. */
  48. /* First of all pointers to types. */
  49. /****************************************************************************/
  50. typedef DCINT DCPTR PDCINT;
  51. typedef DCINT8 DCPTR PDCINT8;
  52. typedef DCINT16 DCPTR PDCINT16;
  53. typedef DCINT32 DCPTR PDCINT32;
  54. typedef DCUINT DCPTR PDCUINT;
  55. typedef DCUINT8 DCPTR PDCUINT8;
  56. typedef DCUINT16 DCPTR PDCUINT16;
  57. typedef DCUINT32 DCPTR PDCUINT32;
  58. typedef DCBOOL DCPTR PDCBOOL;
  59. typedef DCBOOL16 DCPTR PDCBOOL16;
  60. typedef DCBOOL32 DCPTR PDCBOOL32;
  61. typedef DCVOID DCPTR PDCVOID;
  62. /****************************************************************************/
  63. /* Now define pointers to pointers of types. */
  64. /****************************************************************************/
  65. typedef PDCINT DCPTR PPDCINT;
  66. typedef PDCINT8 DCPTR PPDCINT8;
  67. typedef PDCINT16 DCPTR PPDCINT16;
  68. typedef PDCINT32 DCPTR PPDCINT32;
  69. typedef PDCUINT DCPTR PPDCUINT;
  70. typedef PDCUINT8 DCPTR PPDCUINT8;
  71. typedef PDCUINT16 DCPTR PPDCUINT16;
  72. typedef PDCUINT32 DCPTR PPDCUINT32;
  73. typedef PDCBOOL DCPTR PPDCBOOL;
  74. typedef PDCBOOL16 DCPTR PPDCBOOL16;
  75. typedef PDCBOOL32 DCPTR PPDCBOOL32;
  76. typedef PDCVOID DCPTR PPDCVOID;
  77. /****************************************************************************/
  78. /* Define huge pointers to basic types. */
  79. /****************************************************************************/
  80. typedef DCINT DCHPTR HPDCINT;
  81. typedef DCINT8 DCHPTR HPDCINT8;
  82. typedef DCINT16 DCHPTR HPDCINT16;
  83. typedef DCINT32 DCHPTR HPDCINT32;
  84. typedef DCUINT DCHPTR HPDCUINT;
  85. typedef DCUINT8 DCHPTR HPDCUINT8;
  86. typedef DCUINT16 DCHPTR HPDCUINT16;
  87. typedef DCUINT32 DCHPTR HPDCUINT32;
  88. typedef DCBOOL DCHPTR HPDCBOOL;
  89. typedef DCBOOL16 DCHPTR HPDCBOOL16;
  90. typedef DCBOOL32 DCHPTR HPDCBOOL32;
  91. typedef DCVOID DCHPTR HPDCVOID;
  92. /****************************************************************************/
  93. /* Define pointers to huge pointers to types. */
  94. /****************************************************************************/
  95. typedef HPDCINT DCPTR PHPDCINT;
  96. typedef HPDCINT8 DCPTR PHPDCINT8;
  97. typedef HPDCINT16 DCPTR PHPDCINT16;
  98. typedef HPDCINT32 DCPTR PHPDCINT32;
  99. typedef HPDCUINT DCPTR PHPDCUINT;
  100. typedef HPDCUINT8 DCPTR PHPDCUINT8;
  101. typedef HPDCUINT16 DCPTR PHPDCUINT16;
  102. typedef HPDCUINT32 DCPTR PHPDCUINT32;
  103. typedef HPDCBOOL DCPTR PHPDCBOOL;
  104. typedef HPDCBOOL16 DCPTR PHPDCBOOL16;
  105. typedef HPDCBOOL32 DCPTR PHPDCBOOL32;
  106. typedef HPDCVOID DCPTR PHPDCVOID;
  107. /****************************************************************************/
  108. /* Define unaligned pointers to types. */
  109. /****************************************************************************/
  110. typedef DCINT DCUNALIGNED DCPTR PDCINT_UA;
  111. typedef DCINT8 DCUNALIGNED DCPTR PDCINT8_UA;
  112. typedef DCINT16 DCUNALIGNED DCPTR PDCINT16_UA;
  113. typedef DCINT32 DCUNALIGNED DCPTR PDCINT32_UA;
  114. typedef DCUINT DCUNALIGNED DCPTR PDCUINT_UA;
  115. typedef DCUINT8 DCUNALIGNED DCPTR PDCUINT8_UA;
  116. typedef DCUINT16 DCUNALIGNED DCPTR PDCUINT16_UA;
  117. typedef DCUINT32 DCUNALIGNED DCPTR PDCUINT32_UA;
  118. typedef DCBOOL DCUNALIGNED DCPTR PDCBOOL_UA;
  119. typedef DCBOOL16 DCUNALIGNED DCPTR PDCBOOL16_UA;
  120. typedef DCBOOL32 DCUNALIGNED DCPTR PDCBOOL32_UA;
  121. typedef DCVOID DCUNALIGNED DCPTR PDCVOID_UA;
  122. /****************************************************************************/
  123. /* MCS/GCC use enumerations - we pretend they're longs */
  124. /****************************************************************************/
  125. typedef unsigned long DC_ENUM;
  126. #if defined(OS_WIN16) || defined(OS_WINCE)
  127. /****************************************************************************/
  128. // Win16 types corresponding to new Win64/Win32 definitions.
  129. /****************************************************************************/
  130. typedef int INT_PTR; // For dialog proc returns.
  131. typedef unsigned UINT_PTR; // On Win16 this is not exchangeable w/FAR *.
  132. typedef long LONG_PTR;
  133. typedef unsigned long ULONG_PTR;
  134. typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
  135. #endif // OS_WIN16
  136. #endif /* _H_ADCGBTYP */