1 /*++
2 
3 Copyright (c) Microsoft Corporation.  All rights reserved.
4 
5 _WdfVersionBuild_
6 
7 Module Name:
8 
9     wdffileobject.h
10 
11 Abstract:
12 
13     This header containts the Windows Driver Framework file object
14     DDIs.
15 
16 Environment:
17 
18     kernel mode only
19 
20 Revision History:
21 
22 
23 --*/
24 
25 //
26 // NOTE: This header is generated by stubwork.  Please make any
27 //       modifications to the corresponding template files
28 //       (.x or .y) and use stubwork to regenerate the header
29 //
30 
31 #ifndef _WDFFILEOBJECT_H_
32 #define _WDFFILEOBJECT_H_
33 
34 #ifndef WDF_EXTERN_C
35   #ifdef __cplusplus
36     #define WDF_EXTERN_C       extern "C"
37     #define WDF_EXTERN_C_START extern "C" {
38     #define WDF_EXTERN_C_END   }
39   #else
40     #define WDF_EXTERN_C
41     #define WDF_EXTERN_C_START
42     #define WDF_EXTERN_C_END
43   #endif
44 #endif
45 
46 WDF_EXTERN_C_START
47 
48 
49 
50 #if (NTDDI_VERSION >= NTDDI_WIN2K)
51 
52 
53 
54 
55 //
56 // WDF Function: WdfFileObjectGetFileName
57 //
58 typedef
59 _IRQL_requires_max_(PASSIVE_LEVEL)
60 WDFAPI
61 PUNICODE_STRING
62 (STDCALL *PFN_WDFFILEOBJECTGETFILENAME)(
63     _In_
64     PWDF_DRIVER_GLOBALS DriverGlobals,
65     _In_
66     WDFFILEOBJECT FileObject
67     );
68 
69 _IRQL_requires_max_(PASSIVE_LEVEL)
70 FORCEINLINE
71 PUNICODE_STRING
72 WdfFileObjectGetFileName(
73     _In_
74     WDFFILEOBJECT FileObject
75     )
76 {
77     return ((PFN_WDFFILEOBJECTGETFILENAME) WdfFunctions[WdfFileObjectGetFileNameTableIndex])(WdfDriverGlobals, FileObject);
78 }
79 
80 //
81 // WDF Function: WdfFileObjectGetFlags
82 //
83 typedef
84 _IRQL_requires_max_(DISPATCH_LEVEL)
85 WDFAPI
86 ULONG
87 (STDCALL *PFN_WDFFILEOBJECTGETFLAGS)(
88     _In_
89     PWDF_DRIVER_GLOBALS DriverGlobals,
90     _In_
91     WDFFILEOBJECT FileObject
92     );
93 
94 _IRQL_requires_max_(DISPATCH_LEVEL)
95 FORCEINLINE
96 ULONG
97 WdfFileObjectGetFlags(
98     _In_
99     WDFFILEOBJECT FileObject
100     )
101 {
102     return ((PFN_WDFFILEOBJECTGETFLAGS) WdfFunctions[WdfFileObjectGetFlagsTableIndex])(WdfDriverGlobals, FileObject);
103 }
104 
105 //
106 // WDF Function: WdfFileObjectGetDevice
107 //
108 typedef
109 _IRQL_requires_max_(DISPATCH_LEVEL)
110 WDFAPI
111 WDFDEVICE
112 (STDCALL *PFN_WDFFILEOBJECTGETDEVICE)(
113     _In_
114     PWDF_DRIVER_GLOBALS DriverGlobals,
115     _In_
116     WDFFILEOBJECT FileObject
117     );
118 
119 _IRQL_requires_max_(DISPATCH_LEVEL)
120 FORCEINLINE
121 WDFDEVICE
122 WdfFileObjectGetDevice(
123     _In_
124     WDFFILEOBJECT FileObject
125     )
126 {
127     return ((PFN_WDFFILEOBJECTGETDEVICE) WdfFunctions[WdfFileObjectGetDeviceTableIndex])(WdfDriverGlobals, FileObject);
128 }
129 
130 //
131 // WDF Function: WdfFileObjectWdmGetFileObject
132 //
133 typedef
134 _IRQL_requires_max_(DISPATCH_LEVEL)
135 WDFAPI
136 PFILE_OBJECT
137 (STDCALL *PFN_WDFFILEOBJECTWDMGETFILEOBJECT)(
138     _In_
139     PWDF_DRIVER_GLOBALS DriverGlobals,
140     _In_
141     WDFFILEOBJECT FileObject
142     );
143 
144 _IRQL_requires_max_(DISPATCH_LEVEL)
145 FORCEINLINE
146 PFILE_OBJECT
147 WdfFileObjectWdmGetFileObject(
148     _In_
149     WDFFILEOBJECT FileObject
150     )
151 {
152     return ((PFN_WDFFILEOBJECTWDMGETFILEOBJECT) WdfFunctions[WdfFileObjectWdmGetFileObjectTableIndex])(WdfDriverGlobals, FileObject);
153 }
154 
155 
156 
157 
158 
159 
160 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
161 
162 
163 WDF_EXTERN_C_END
164 
165 #endif // _WDFFILEOBJECT_H_
166 
167