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.

227 lines
10 KiB

  1. /**INC+**********************************************************************/
  2. /* Header: ndcgbtyp.h */
  3. /* */
  4. /* Purpose: Basic types - Win32 specific header */
  5. /* */
  6. /* Copyright(C) Microsoft Corporation 1997 */
  7. /* */
  8. /****************************************************************************/
  9. /** Changes:
  10. * $Log: Y:/logs/hydra/tshrclnt/inc/dcl/ndcgbtyp.h_v $
  11. *
  12. * Rev 1.13 24 Sep 1997 10:34:42 AK
  13. * SFR1424: Disable warning 4702 for old compiler
  14. *
  15. * Rev 1.12 22 Aug 1997 13:21:12 TH
  16. * SFR1133: Initial DD code drop
  17. *
  18. * Rev 1.11 15 Aug 1997 17:06:28 mr
  19. * SFR1133: Tidy up CA further
  20. *
  21. * Rev 1.10 07 Aug 1997 14:33:50 MR
  22. * SFR1133: Persuade Wd to compile under C++
  23. *
  24. * Rev 1.9 05 Aug 1997 14:09:22 MR
  25. * SFR1133: Changes for Citrix build environment
  26. *
  27. * Rev 1.8 04 Aug 1997 14:56:50 KH
  28. * SFR1022: Move DCCALLBACK to wdcgbtyp, add LOADDS
  29. *
  30. * Rev 1.7 23 Jul 1997 10:47:56 mr
  31. * SFR1079: Merged \server\h duplicates to \h\dcl
  32. *
  33. * Rev 1.6 10 Jul 1997 17:23:12 KH
  34. * SFR1022: Get 16-bit trace working
  35. *
  36. * Rev 1.5 09 Jul 1997 17:08:38 AK
  37. * SFR1016: Initial changes to support Unicode
  38. *
  39. * Rev 1.3 16 Jul 1997 13:57:56 MR
  40. * SFR1080: Added PPDCACHAR
  41. *
  42. * Rev 1.2 14 Jul 1997 17:15:48 OBK
  43. * SFR1080: Define DCACHAR and PDCACHAR
  44. *
  45. * Rev 1.1 19 Jun 1997 21:50:30 OBK
  46. * SFR0000: Start of RNS codebase
  47. **/
  48. /**INC-**********************************************************************/
  49. #ifndef _H_NDCGBTYP
  50. #define _H_NDCGBTYP
  51. /****************************************************************************/
  52. /* */
  53. /* INCLUDES */
  54. /* */
  55. /****************************************************************************/
  56. /****************************************************************************/
  57. /* Check whether we should include the system headers. */
  58. /****************************************************************************/
  59. #ifndef DC_NO_SYSTEM_HEADERS
  60. #if defined(DLL_DISP) || defined(DLL_WD)
  61. /****************************************************************************/
  62. /* winsta.h defines BYTE as unsigned char; later, windef.h typedefs it. */
  63. /* This ends up as 'typedef unsigned char unsigned char' which doesn't */
  64. /* compile too well... */
  65. /* */
  66. /* This is my attempt to avoid it */
  67. /****************************************************************************/
  68. #ifdef BYTE
  69. #undef BYTE
  70. #endif
  71. #define BYTE BYTE
  72. /****************************************************************************/
  73. /* Windows NT DDK include files (used to replace standard windows.h) */
  74. /* */
  75. /* The display driver runs in the Kernel space and so MUST NOT access any */
  76. /* Win32 functions or data. Instead we can only use the Win32k functions */
  77. /* as described in the DDK. */
  78. /****************************************************************************/
  79. #include <stddef.h>
  80. #include <stdarg.h>
  81. #include <ntddk.h>
  82. #include <windef.h>
  83. #include <wingdi.h>
  84. #include <winddi.h>
  85. typedef struct _FILETIME /* from wtypes.h */
  86. {
  87. DWORD dwLowDateTime;
  88. DWORD dwHighDateTime;
  89. } FILETIME;
  90. #else
  91. /****************************************************************************/
  92. /* Standard USER space windows header files. */
  93. /* */
  94. /* Force strict type checking. */
  95. /****************************************************************************/
  96. #ifndef STRICT
  97. #define STRICT
  98. #endif
  99. /****************************************************************************/
  100. /* Disable the following warnings for the Windows headers: */
  101. /* */
  102. /* 4115: named type definition in parentheses */
  103. /* 4201: nonstandard extension used : nameless struct/union */
  104. /* 4214: nonstandard extension used : bit field types other than int */
  105. /* */
  106. /****************************************************************************/
  107. #pragma warning (disable: 4115)
  108. #pragma warning (disable: 4201)
  109. #pragma warning (disable: 4214)
  110. /****************************************************************************/
  111. /* Include the system headers. */
  112. /****************************************************************************/
  113. #include <windows.h>
  114. #include <windowsx.h>
  115. #include <tchar.h>
  116. #ifdef OS_WINCE
  117. #include <wince.h>
  118. #endif
  119. #pragma warning (default: 4115)
  120. #pragma warning (default: 4201)
  121. #pragma warning (default: 4214)
  122. #endif /* defined(DLL_DISP) || defined(DLL_WD) */
  123. #endif /* DCS_NO_SYSTEM_HEADERS */
  124. /****************************************************************************/
  125. /* Disable the following warnings for our code: */
  126. /* */
  127. /* 4102: "Unreferenced label" warnings so that DC_EXIT_POINT can be placed */
  128. /* in each function if there aren't (yet) any DC_QUITs. */
  129. /* 4514: unreferenced inline function has been removed */
  130. /* 4057: slightly different types for L"string" and (wchar_t *) */
  131. /* 4702: unreachable code (retail VC++4.2 only) */
  132. /* */
  133. /****************************************************************************/
  134. #pragma warning (disable: 4102)
  135. #pragma warning (disable: 4514)
  136. #pragma warning (disable: 4057)
  137. #ifndef DC_DEBUG
  138. #pragma warning (disable: 4702)
  139. #endif
  140. /****************************************************************************/
  141. /* Promote the following warnings to errors: */
  142. /* */
  143. /* 4706 - "Assignment in conditional expression" */
  144. /* 4013 - "'FunctionName' undefined; assuming extern returning int" */
  145. /* */
  146. /* Promote the following warnings to level 3: */
  147. /* */
  148. /* 4100 - "unreferenced formal parameter" */
  149. /* 4701 - "Local variable may be used before being initialized". */
  150. /* 4244 - "conversion from 'int ' to 'short ', possible loss of data */
  151. /* 4127 - "conditional expression is constant */
  152. /* */
  153. /****************************************************************************/
  154. // #pragma warning (error: 4706)
  155. // #pragma warning (error: 4013)
  156. // #pragma warning (3 : 4100)
  157. // #pragma warning (3 : 4701)
  158. // #pragma warning (3 : 4244)
  159. // #pragma warning (3 : 4127)
  160. /****************************************************************************/
  161. /* */
  162. /* CONSTANTS */
  163. /* */
  164. /****************************************************************************/
  165. /****************************************************************************/
  166. /* */
  167. /* TYPES */
  168. /* */
  169. /****************************************************************************/
  170. /****************************************************************************/
  171. /* DCPTR is used when declaring pointers to variables. Use it to get the */
  172. /* correct pointer types for your memory model/compiler. */
  173. /****************************************************************************/
  174. #define DCPTR *
  175. /****************************************************************************/
  176. /* DCUNALIGNED is used to define pointers to values which are not aligned */
  177. /* on the correct boundary. e.g. a DCUINT32 which does not start on a 4 */
  178. /* byte boundary. */
  179. /****************************************************************************/
  180. #define DCUNALIGNED UNALIGNED
  181. /****************************************************************************/
  182. /* Define function calling conventions. Note that PDCAPI should be used to */
  183. /* declare a pointer to a function. */
  184. /****************************************************************************/
  185. #define DCEXPORT
  186. #define DCLOADDS
  187. #ifndef OS_WINCE
  188. #define DCAPI _stdcall
  189. #define DCINTERNAL _stdcall
  190. #else //no _stdcall support on CE.
  191. #define DCAPI __cdecl
  192. #define DCINTERNAL __cdecl
  193. #define _stdcall __cdecl
  194. #define __stdcall __cdecl
  195. #endif
  196. #define PDCAPI DCAPI DCPTR
  197. #define PDCCALLBACK DCCALLBACK DCPTR
  198. #define PDCINTERNAL DCINTERNAL DCPTR
  199. /****************************************************************************/
  200. /* Define DCHPTR. */
  201. /****************************************************************************/
  202. #define DCHPTR *
  203. #endif /* _H_NDCGBTYP */