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.

139 lines
2.7 KiB

  1. /******************************************************************************
  2. *
  3. * $RCSfile: Comwdm.h $
  4. * $Source: u:/si/VXP/Wdm/Include/Comwdm.h $
  5. * $Author: Max $
  6. * $Date: 1998/09/03 03:19:16 $
  7. * $Revision: 1.3 $
  8. *
  9. * Written by: Max Paklin
  10. * Purpose: Commonly used definitions
  11. *
  12. *******************************************************************************
  13. *
  14. * Copyright 1996-98, AuraVision Corporation. All rights reserved.
  15. *
  16. * AuraVision Corporation makes no warranty of any kind, express or implied,
  17. * with regard to this software. In no event shall AuraVision Corporation
  18. * be liable for incidental or consequential damages in connection with or
  19. * arising from the furnishing, performance, or use of this software.
  20. *
  21. *******************************************************************************/
  22. #ifndef __COMWDM_H__
  23. #define __COMWDM_H__
  24. // Make sure that all the nessessary constants are defined
  25. #ifndef _KERNELMODE
  26. #define _KERNELMODE
  27. #endif
  28. #if defined( _DEBUG ) || defined( _RETAIL_LOGGING )
  29. #define DBG_PRINTS
  30. #else
  31. #define DBG_PRINTS {}
  32. #endif
  33. #if defined( DEBUG ) || defined( _DEBUG )
  34. #ifndef _DEBUG
  35. #define _DEBUG
  36. #endif
  37. #ifndef DEBUG
  38. #define DEBUG
  39. #endif
  40. #if !defined( DBG ) || DBG != 1
  41. #ifdef DBG
  42. #undef DBG
  43. #endif
  44. #define DBG 1
  45. #endif // #if !defined( DBG ) || DBG != 1
  46. #ifdef NDEBUG
  47. #error NDEBUG shouldn't be defined
  48. #endif
  49. #else // #if defined( DEBUG ) || defined( _DEBUG )
  50. #ifdef _DEBUG
  51. #undef _DEBUG
  52. #endif
  53. #ifdef DEBUG
  54. #undef DEBUG
  55. #endif
  56. #ifdef DBG
  57. #undef DBG
  58. #endif
  59. #ifndef NDEBUG
  60. #define NDEBUG
  61. #endif
  62. #endif // #if defined( DEBUG ) || defined( _DEBUG )
  63. #ifdef USE_MONOCHROMEMONITOR
  64. #if USE_MONOCHROMEMONITOR != 1
  65. #undef USE_MONOCHROMEMONITOR
  66. #endif
  67. #endif
  68. #ifndef _UNICODE
  69. #define _UNICODE
  70. #endif
  71. #ifndef UNICODE
  72. #define UNICODE
  73. #endif
  74. #ifndef WIN32_LEAN_AND_MEAN
  75. #define WIN32_LEAN_AND_MEAN
  76. #endif
  77. #ifdef DEVL
  78. #undef DEVL
  79. #endif
  80. #define DEVL 1
  81. #ifdef NT_UP
  82. #undef NT_UP
  83. #endif
  84. #define NT_UP 1
  85. #ifdef _WIN32_WINNT
  86. #undef _WIN32_WINNT
  87. #endif
  88. #define _WIN32_WINNT 0x0400
  89. #ifdef __cplusplus
  90. extern "C"
  91. {
  92. #endif
  93. #include <wdm.h>
  94. #define _WDMDDK_
  95. #include <strmini.h>
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #include <ksmedia.h>
  100. #ifdef __cplusplus
  101. #include "DrvReg.h"
  102. inline void FatalError( ULONG ulCode )
  103. {
  104. #ifdef _DEBUG
  105. ASSERT( FALSE );
  106. DEBUG_BREAKPOINT();
  107. UNREFERENCED_PARAMETER( ulCode );
  108. #else
  109. StreamClassDebugPrint( DebugLevelFatal, "Serious error happens %d\n", ulCode );
  110. #endif
  111. }
  112. #endif // #ifdef __cplusplus
  113. // Definitions for FOURCC codes:
  114. #define MAKE_FOURCC( ch0, ch1, ch2, ch3 ) \
  115. ( (DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
  116. ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24) )
  117. #define FOURCC_YUY2 MAKE_FOURCC( 'Y', 'U', 'Y', '2' )
  118. #define FOURCC_UYVY MAKE_FOURCC( 'U', 'Y', 'V', 'Y' )
  119. #endif // #ifndef __COMWDM_H__