ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

wdm.template.h
Go to the documentation of this file.
00001 /*
00002  * wdm.h
00003  *
00004  * Windows NT WDM Driver Developer Kit
00005  *
00006  * This file is part of the ReactOS DDK package.
00007  *
00008  * Contributors:
00009  *   Amine Khaldi (amine.khaldi@reactos.org)
00010  *   Timo Kreuzer (timo.kreuzer@reactos.org)
00011  *
00012  * THIS SOFTWARE IS NOT COPYRIGHTED
00013  *
00014  * This source code is offered for use in the public domain. You may
00015  * use, modify or distribute it freely.
00016  *
00017  * This code is distributed in the hope that it will be useful but
00018  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
00019  * DISCLAIMED. This includes but is not limited to warranties of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00021  *
00022  */
00023 #pragma once
00024 
00025 #ifndef _WDMDDK_
00026 #define _WDMDDK_
00027 
00028 #define WDM_MAJORVERSION        0x06
00029 #define WDM_MINORVERSION        0x00
00030 
00031 /* Included via ntddk.h? */
00032 #ifndef _NTDDK_
00033 #define _NTDDK_
00034 #define _WDM_INCLUDED_
00035 #define _DDK_DRIVER_
00036 #define NO_INTERLOCKED_INTRINSICS
00037 #endif /* _NTDDK_ */
00038 
00039 /* Dependencies */
00040 #define NT_INCLUDED
00041 #include <excpt.h>
00042 #include <ntdef.h>
00043 #include <ntstatus.h>
00044 #include <ntiologc.h>
00045 
00046 #ifndef GUID_DEFINED
00047 #include <guiddef.h>
00048 #endif
00049 
00050 #ifdef _MAC
00051 #ifndef _INC_STRING
00052 #include <string.h>
00053 #endif /* _INC_STRING */
00054 #else
00055 #include <string.h>
00056 #endif /* _MAC */
00057 
00058 #ifndef _KTMTYPES_
00059 typedef GUID UOW, *PUOW;
00060 #endif
00061 
00062 typedef GUID *PGUID;
00063 
00064 #if (NTDDI_VERSION >= NTDDI_WINXP)
00065 #include <dpfilter.h>
00066 #endif
00067 
00068 #include "intrin.h"
00069 
00070 __internal_kernel_driver
00071 __drv_Mode_impl(WDM_INCLUDED)
00072 
00073 #ifdef __cplusplus
00074 extern "C" {
00075 #endif
00076 
00077 #if !defined(_NTHALDLL_) && !defined(_BLDR_)
00078 #define NTHALAPI DECLSPEC_IMPORT
00079 #else
00080 #define NTHALAPI
00081 #endif
00082 
00083 /* For ReactOS */
00084 #if !defined(_NTOSKRNL_) && !defined(_BLDR_)
00085 #define NTKERNELAPI DECLSPEC_IMPORT
00086 #else
00087 #define NTKERNELAPI
00088 #endif
00089 
00090 #if defined(_X86_) && !defined(_NTHAL_)
00091 #define _DECL_HAL_KE_IMPORT  DECLSPEC_IMPORT
00092 #elif defined(_X86_)
00093 #define _DECL_HAL_KE_IMPORT
00094 #else
00095 #define _DECL_HAL_KE_IMPORT NTKERNELAPI
00096 #endif
00097 
00098 #if defined(_WIN64)
00099 #define POINTER_ALIGNMENT DECLSPEC_ALIGN(8)
00100 #else
00101 #define POINTER_ALIGNMENT
00102 #endif
00103 
00104 /* Helper macro to enable gcc's extension.  */
00105 #ifndef __GNU_EXTENSION
00106 #ifdef __GNUC__
00107 #define __GNU_EXTENSION __extension__
00108 #else
00109 #define __GNU_EXTENSION
00110 #endif
00111 #endif
00112 
00113 #if defined(_MSC_VER)
00114 
00115 /* Disable some warnings */
00116 #pragma warning(disable:4115) /* Named type definition in parentheses */
00117 #pragma warning(disable:4201) /* Nameless unions and structs */
00118 #pragma warning(disable:4214) /* Bit fields of other types than int */
00119 #pragma warning(disable:4820) /* Padding added, due to alignemnet requirement */
00120 
00121 /* Indicate if #pragma alloc_text() is supported */
00122 #if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)
00123 #define ALLOC_PRAGMA 1
00124 #endif
00125 
00126 /* Indicate if #pragma data_seg() is supported */
00127 #if defined(_M_IX86) || defined(_M_AMD64)
00128 #define ALLOC_DATA_PRAGMA 1
00129 #endif
00130 
00131 #endif
00132 
00133 #if defined(_WIN64)
00134 #if !defined(USE_DMA_MACROS) && !defined(_NTHAL_)
00135 #define USE_DMA_MACROS
00136 #endif
00137 #if !defined(NO_LEGACY_DRIVERS) && !defined(__REACTOS__)
00138 #define NO_LEGACY_DRIVERS
00139 #endif
00140 #endif /* defined(_WIN64) */
00141 
00142 /* Forward declarations */
00143 struct _IRP;
00144 struct _MDL;
00145 struct _KAPC;
00146 struct _KDPC;
00147 struct _FILE_OBJECT;
00148 struct _DMA_ADAPTER;
00149 struct _DEVICE_OBJECT;
00150 struct _DRIVER_OBJECT;
00151 struct _IO_STATUS_BLOCK;
00152 struct _DEVICE_DESCRIPTION;
00153 struct _SCATTER_GATHER_LIST;
00154 struct _DRIVE_LAYOUT_INFORMATION;
00155 struct _COMPRESSED_DATA_INFO;
00156 struct _IO_RESOURCE_DESCRIPTOR;
00157 
00158 /* Structures not exposed to drivers */
00159 typedef struct _OBJECT_TYPE *POBJECT_TYPE;
00160 typedef struct _HAL_DISPATCH_TABLE *PHAL_DISPATCH_TABLE;
00161 typedef struct _HAL_PRIVATE_DISPATCH_TABLE *PHAL_PRIVATE_DISPATCH_TABLE;
00162 typedef struct _CALLBACK_OBJECT *PCALLBACK_OBJECT;
00163 typedef struct _EPROCESS *PEPROCESS;
00164 typedef struct _ETHREAD *PETHREAD;
00165 typedef struct _IO_TIMER *PIO_TIMER;
00166 typedef struct _KINTERRUPT *PKINTERRUPT;
00167 typedef struct _KPROCESS *PKPROCESS;
00168 typedef struct _KTHREAD *PKTHREAD, *PRKTHREAD;
00169 typedef struct _CONTEXT *PCONTEXT;
00170 
00171 #if defined(USE_DMA_MACROS) && !defined(_NTHAL_)
00172 typedef struct _DMA_ADAPTER *PADAPTER_OBJECT;
00173 #elif defined(_WDM_INCLUDED_)
00174 typedef struct _DMA_ADAPTER *PADAPTER_OBJECT;
00175 #else
00176 typedef struct _ADAPTER_OBJECT *PADAPTER_OBJECT;
00177 #endif
00178 
00179 #ifndef DEFINE_GUIDEX
00180 #ifdef _MSC_VER
00181 #define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name
00182 #else
00183 #define DEFINE_GUIDEX(name) EXTERN_C const GUID name
00184 #endif
00185 #endif /* DEFINE_GUIDEX */
00186 
00187 #ifndef STATICGUIDOF
00188 #define STATICGUIDOF(guid) STATIC_##guid
00189 #endif
00190 
00191 /* GUID Comparison */
00192 #ifndef __IID_ALIGNED__
00193 #define __IID_ALIGNED__
00194 #ifdef __cplusplus
00195 inline int IsEqualGUIDAligned(REFGUID guid1, REFGUID guid2)
00196 {
00197     return ( (*(PLONGLONG)(&guid1) == *(PLONGLONG)(&guid2)) &&
00198              (*((PLONGLONG)(&guid1) + 1) == *((PLONGLONG)(&guid2) + 1)) );
00199 }
00200 #else
00201 #define IsEqualGUIDAligned(guid1, guid2) \
00202            ( (*(PLONGLONG)(guid1) == *(PLONGLONG)(guid2)) && \
00203              (*((PLONGLONG)(guid1) + 1) == *((PLONGLONG)(guid2) + 1)) )
00204 #endif /* __cplusplus */
00205 #endif /* !__IID_ALIGNED__ */
00206 
00207 
00208 $define (_WDMDDK_)
00209 $include (interlocked.h)
00210 $include (rtltypes.h)
00211 $include (ketypes.h)
00212 $include (mmtypes.h)
00213 $include (extypes.h)
00214 $include (setypes.h)
00215 $include (potypes.h)
00216 $include (cmtypes.h)
00217 $include (iotypes.h)
00218 $include (obtypes.h)
00219 $include (pstypes.h)
00220 $include (wmitypes.h)
00221 
00222 $include (rtlfuncs.h)
00223 $include (kefuncs.h)
00224 $include (mmfuncs.h)
00225 $include (sefuncs.h)
00226 $include (cmfuncs.h)
00227 $include (iofuncs.h)
00228 $include (pofuncs.h)
00229 $include (exfuncs.h)
00230 $include (obfuncs.h)
00231 $include (psfuncs.h)
00232 $include (wmifuncs.h)
00233 $include (kdfuncs.h)
00234 $include (halfuncs.h)
00235 $include (nttmapi.h)
00236 $include (zwfuncs.h)
00237 
00238 #ifdef __cplusplus
00239 }
00240 #endif
00241 
00242 #endif /* !_WDMDDK_ */

Generated on Sat May 26 2012 04:32:15 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.