xref: /reactos/sdk/include/wdf/kmdf/1.17/wdftypes.h (revision 40462c92)
1 /*++
2 
3 Copyright (c) Microsoft Corporation.  All rights reserved.
4 
5 _WdfVersionBuild_
6 
7 Module Name:
8 
9     wdfypes.h
10 
11 Abstract:
12 
13     This module contains contains the C driver frameworks basic types.
14 
15 Environment:
16 
17     kernel mode only
18 
19 Revision History:
20 
21 
22 --*/
23 
24 //
25 // NOTE: This header is generated by stubwork.  Please make any
26 //       modifications to the corresponding template files
27 //       (.x or .y) and use stubwork to regenerate the header
28 //
29 
30 #ifndef _WDFTYPES_H_
31 #define _WDFTYPES_H_
32 
33 #ifndef WDF_EXTERN_C
34   #ifdef __cplusplus
35     #define WDF_EXTERN_C       extern "C"
36     #define WDF_EXTERN_C_START extern "C" {
37     #define WDF_EXTERN_C_END   }
38   #else
39     #define WDF_EXTERN_C
40     #define WDF_EXTERN_C_START
41     #define WDF_EXTERN_C_END
42   #endif
43 #endif
44 
45 WDF_EXTERN_C_START
46 
47 
48 
49 #if (NTDDI_VERSION >= NTDDI_WIN2K)
50 
51 
52 
53 #define WDFAPI
54 
55 #ifndef __WDF_BYTE_DEFINED__
56 #define __WDF_BYTE_DEFINED__
57 typedef UCHAR BYTE;
58 #endif // __WDF_BYTE_DEFINED__
59 
60 //
61 // Windows 2000 does not define FORCEINLINE, so define it if needed
62 //
63 #ifndef FORCEINLINE
64 #if (_MSC_VER >= 1200)
65 #define FORCEINLINE __forceinline
66 #else
67 #define FORCEINLINE __inline
68 #endif
69 #endif
70 
71 
72 //
73 // WDF_WPP_KMDF_DRIVER  define is used by the WPP trace template file
74 // (km-init.tpl) to call the framework to register the KMDF provider
75 // if the WppInit and WppCleanup functions are executed in the
76 // Windows 2000 system.
77 //
78 #ifndef WDF_WPP_KMDF_DRIVER
79 #define WDF_WPP_KMDF_DRIVER
80 #endif // WDF_WPP_KMDF_DRIVER
81 
82 //
83 // Do not create an invalid value for this enum in case driver writers mix up
84 // the usage of WdfFalse/FALSE and WdfTrue/TRUE.
85 //
86 typedef enum _WDF_TRI_STATE {
87     WdfFalse = FALSE,
88     WdfTrue = TRUE,
89     WdfUseDefault = 2,
90 } WDF_TRI_STATE, *PWDF_TRI_STATE;
91 
92 
93 
94 typedef PVOID WDFCONTEXT;
95 
96 //
97 // Forward declare structures needed later header files
98 //
99 typedef struct WDFDEVICE_INIT *PWDFDEVICE_INIT;
100 typedef struct WDFCXDEVICE_INIT *PWDFCXDEVICE_INIT;
101 
102 typedef struct _WDF_OBJECT_ATTRIBUTES *PWDF_OBJECT_ATTRIBUTES;
103 
104 
105 #define WDF_NO_OBJECT_ATTRIBUTES (NULL)
106 #define WDF_NO_EVENT_CALLBACK (NULL)
107 #define WDF_NO_HANDLE (NULL)
108 #define WDF_NO_CONTEXT (NULL)
109 #define WDF_NO_SEND_OPTIONS (NULL)
110 
111 //
112 // General Handle Type, should always be typeless
113 //
114 typedef HANDLE WDFOBJECT, *PWDFOBJECT;
115 
116 //
117 // core handles
118 //
119 DECLARE_HANDLE( WDFDRIVER );
120 DECLARE_HANDLE( WDFDEVICE );
121 
122 DECLARE_HANDLE( WDFWMIPROVIDER );
123 DECLARE_HANDLE( WDFWMIINSTANCE );
124 
125 DECLARE_HANDLE( WDFQUEUE );
126 DECLARE_HANDLE( WDFREQUEST );
127 DECLARE_HANDLE( WDFFILEOBJECT );
128 DECLARE_HANDLE( WDFDPC );
129 DECLARE_HANDLE( WDFTIMER );
130 DECLARE_HANDLE( WDFWORKITEM );
131 DECLARE_HANDLE( WDFINTERRUPT );
132 
133 //
134 // synch and lock handles
135 //
136 DECLARE_HANDLE( WDFWAITLOCK );
137 DECLARE_HANDLE( WDFSPINLOCK );
138 
139 DECLARE_HANDLE( WDFMEMORY );
140 DECLARE_HANDLE( WDFLOOKASIDE );
141 
142 //
143 // i/o targets for different busses
144 //
145 DECLARE_HANDLE( WDFIOTARGET );
146 DECLARE_HANDLE( WDFUSBDEVICE );
147 DECLARE_HANDLE( WDFUSBINTERFACE );
148 DECLARE_HANDLE( WDFUSBPIPE );
149 
150 // dma handles
151 DECLARE_HANDLE( WDFDMAENABLER );
152 DECLARE_HANDLE( WDFDMATRANSACTION );
153 DECLARE_HANDLE( WDFCOMMONBUFFER );
154 
155 //
156 // support handles
157 //
158 DECLARE_HANDLE( WDFKEY );
159 DECLARE_HANDLE( WDFSTRING );
160 DECLARE_HANDLE( WDFCOLLECTION );
161 DECLARE_HANDLE( WDFCHILDLIST );
162 
163 DECLARE_HANDLE( WDFIORESREQLIST );
164 DECLARE_HANDLE( WDFIORESLIST );
165 DECLARE_HANDLE( WDFCMRESLIST );
166 
167 
168 
169 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
170 
171 
172 WDF_EXTERN_C_END
173 
174 #endif // _WDFTYPES_H_
175 
176 
177