140462c92SVictor Perevertkin /*++ 240462c92SVictor Perevertkin 340462c92SVictor Perevertkin Copyright (c) Microsoft Corporation. All rights reserved. 440462c92SVictor Perevertkin 540462c92SVictor Perevertkin _WdfVersionBuild_ 640462c92SVictor Perevertkin 740462c92SVictor Perevertkin Module Name: 840462c92SVictor Perevertkin 940462c92SVictor Perevertkin wdffileobject.h 1040462c92SVictor Perevertkin 1140462c92SVictor Perevertkin Abstract: 1240462c92SVictor Perevertkin 1340462c92SVictor Perevertkin This header containts the Windows Driver Framework file object 1440462c92SVictor Perevertkin DDIs. 1540462c92SVictor Perevertkin 1640462c92SVictor Perevertkin Environment: 1740462c92SVictor Perevertkin 1840462c92SVictor Perevertkin kernel mode only 1940462c92SVictor Perevertkin 2040462c92SVictor Perevertkin Revision History: 2140462c92SVictor Perevertkin 2240462c92SVictor Perevertkin 2340462c92SVictor Perevertkin --*/ 2440462c92SVictor Perevertkin 2540462c92SVictor Perevertkin // 2640462c92SVictor Perevertkin // NOTE: This header is generated by stubwork. Please make any 2740462c92SVictor Perevertkin // modifications to the corresponding template files 2840462c92SVictor Perevertkin // (.x or .y) and use stubwork to regenerate the header 2940462c92SVictor Perevertkin // 3040462c92SVictor Perevertkin 3140462c92SVictor Perevertkin #ifndef _WDFFILEOBJECT_H_ 3240462c92SVictor Perevertkin #define _WDFFILEOBJECT_H_ 3340462c92SVictor Perevertkin 3440462c92SVictor Perevertkin #ifndef WDF_EXTERN_C 3540462c92SVictor Perevertkin #ifdef __cplusplus 3640462c92SVictor Perevertkin #define WDF_EXTERN_C extern "C" 3740462c92SVictor Perevertkin #define WDF_EXTERN_C_START extern "C" { 3840462c92SVictor Perevertkin #define WDF_EXTERN_C_END } 3940462c92SVictor Perevertkin #else 4040462c92SVictor Perevertkin #define WDF_EXTERN_C 4140462c92SVictor Perevertkin #define WDF_EXTERN_C_START 4240462c92SVictor Perevertkin #define WDF_EXTERN_C_END 4340462c92SVictor Perevertkin #endif 4440462c92SVictor Perevertkin #endif 4540462c92SVictor Perevertkin 4640462c92SVictor Perevertkin WDF_EXTERN_C_START 4740462c92SVictor Perevertkin 4840462c92SVictor Perevertkin 4940462c92SVictor Perevertkin 5040462c92SVictor Perevertkin #if (NTDDI_VERSION >= NTDDI_WIN2K) 5140462c92SVictor Perevertkin 5240462c92SVictor Perevertkin 5340462c92SVictor Perevertkin 5440462c92SVictor Perevertkin 5540462c92SVictor Perevertkin // 5640462c92SVictor Perevertkin // WDF Function: WdfFileObjectGetFileName 5740462c92SVictor Perevertkin // 5840462c92SVictor Perevertkin typedef 5940462c92SVictor Perevertkin _IRQL_requires_max_(PASSIVE_LEVEL) 6040462c92SVictor Perevertkin WDFAPI 6140462c92SVictor Perevertkin PUNICODE_STRING 62*545df815SVictor Perevertkin (STDCALL *PFN_WDFFILEOBJECTGETFILENAME)( 6340462c92SVictor Perevertkin _In_ 6440462c92SVictor Perevertkin PWDF_DRIVER_GLOBALS DriverGlobals, 6540462c92SVictor Perevertkin _In_ 6640462c92SVictor Perevertkin WDFFILEOBJECT FileObject 6740462c92SVictor Perevertkin ); 6840462c92SVictor Perevertkin _IRQL_requires_max_(PASSIVE_LEVEL)6940462c92SVictor Perevertkin_IRQL_requires_max_(PASSIVE_LEVEL) 7040462c92SVictor Perevertkin FORCEINLINE 71*545df815SVictor Perevertkin PUNICODE_STRING 7240462c92SVictor Perevertkin WdfFileObjectGetFileName( 7340462c92SVictor Perevertkin _In_ 7440462c92SVictor Perevertkin WDFFILEOBJECT FileObject 7540462c92SVictor Perevertkin ) 7640462c92SVictor Perevertkin { 7740462c92SVictor Perevertkin return ((PFN_WDFFILEOBJECTGETFILENAME) WdfFunctions[WdfFileObjectGetFileNameTableIndex])(WdfDriverGlobals, FileObject); 7840462c92SVictor Perevertkin } 7940462c92SVictor Perevertkin 8040462c92SVictor Perevertkin // 8140462c92SVictor Perevertkin // WDF Function: WdfFileObjectGetFlags 8240462c92SVictor Perevertkin // 8340462c92SVictor Perevertkin typedef 8440462c92SVictor Perevertkin _IRQL_requires_max_(DISPATCH_LEVEL) 8540462c92SVictor Perevertkin WDFAPI 8640462c92SVictor Perevertkin ULONG 87*545df815SVictor Perevertkin (STDCALL *PFN_WDFFILEOBJECTGETFLAGS)( 8840462c92SVictor Perevertkin _In_ 8940462c92SVictor Perevertkin PWDF_DRIVER_GLOBALS DriverGlobals, 9040462c92SVictor Perevertkin _In_ 9140462c92SVictor Perevertkin WDFFILEOBJECT FileObject 9240462c92SVictor Perevertkin ); 9340462c92SVictor Perevertkin _IRQL_requires_max_(DISPATCH_LEVEL)9440462c92SVictor Perevertkin_IRQL_requires_max_(DISPATCH_LEVEL) 9540462c92SVictor Perevertkin FORCEINLINE 96*545df815SVictor Perevertkin ULONG 9740462c92SVictor Perevertkin WdfFileObjectGetFlags( 9840462c92SVictor Perevertkin _In_ 9940462c92SVictor Perevertkin WDFFILEOBJECT FileObject 10040462c92SVictor Perevertkin ) 10140462c92SVictor Perevertkin { 10240462c92SVictor Perevertkin return ((PFN_WDFFILEOBJECTGETFLAGS) WdfFunctions[WdfFileObjectGetFlagsTableIndex])(WdfDriverGlobals, FileObject); 10340462c92SVictor Perevertkin } 10440462c92SVictor Perevertkin 10540462c92SVictor Perevertkin // 10640462c92SVictor Perevertkin // WDF Function: WdfFileObjectGetDevice 10740462c92SVictor Perevertkin // 10840462c92SVictor Perevertkin typedef 10940462c92SVictor Perevertkin _IRQL_requires_max_(DISPATCH_LEVEL) 11040462c92SVictor Perevertkin WDFAPI 11140462c92SVictor Perevertkin WDFDEVICE 112*545df815SVictor Perevertkin (STDCALL *PFN_WDFFILEOBJECTGETDEVICE)( 11340462c92SVictor Perevertkin _In_ 11440462c92SVictor Perevertkin PWDF_DRIVER_GLOBALS DriverGlobals, 11540462c92SVictor Perevertkin _In_ 11640462c92SVictor Perevertkin WDFFILEOBJECT FileObject 11740462c92SVictor Perevertkin ); 11840462c92SVictor Perevertkin _IRQL_requires_max_(DISPATCH_LEVEL)11940462c92SVictor Perevertkin_IRQL_requires_max_(DISPATCH_LEVEL) 12040462c92SVictor Perevertkin FORCEINLINE 121*545df815SVictor Perevertkin WDFDEVICE 12240462c92SVictor Perevertkin WdfFileObjectGetDevice( 12340462c92SVictor Perevertkin _In_ 12440462c92SVictor Perevertkin WDFFILEOBJECT FileObject 12540462c92SVictor Perevertkin ) 12640462c92SVictor Perevertkin { 12740462c92SVictor Perevertkin return ((PFN_WDFFILEOBJECTGETDEVICE) WdfFunctions[WdfFileObjectGetDeviceTableIndex])(WdfDriverGlobals, FileObject); 12840462c92SVictor Perevertkin } 12940462c92SVictor Perevertkin 13040462c92SVictor Perevertkin // 13140462c92SVictor Perevertkin // WDF Function: WdfFileObjectWdmGetFileObject 13240462c92SVictor Perevertkin // 13340462c92SVictor Perevertkin typedef 13440462c92SVictor Perevertkin _IRQL_requires_max_(DISPATCH_LEVEL) 13540462c92SVictor Perevertkin WDFAPI 13640462c92SVictor Perevertkin PFILE_OBJECT 137*545df815SVictor Perevertkin (STDCALL *PFN_WDFFILEOBJECTWDMGETFILEOBJECT)( 13840462c92SVictor Perevertkin _In_ 13940462c92SVictor Perevertkin PWDF_DRIVER_GLOBALS DriverGlobals, 14040462c92SVictor Perevertkin _In_ 14140462c92SVictor Perevertkin WDFFILEOBJECT FileObject 14240462c92SVictor Perevertkin ); 14340462c92SVictor Perevertkin _IRQL_requires_max_(DISPATCH_LEVEL)14440462c92SVictor Perevertkin_IRQL_requires_max_(DISPATCH_LEVEL) 14540462c92SVictor Perevertkin FORCEINLINE 146*545df815SVictor Perevertkin PFILE_OBJECT 14740462c92SVictor Perevertkin WdfFileObjectWdmGetFileObject( 14840462c92SVictor Perevertkin _In_ 14940462c92SVictor Perevertkin WDFFILEOBJECT FileObject 15040462c92SVictor Perevertkin ) 15140462c92SVictor Perevertkin { 15240462c92SVictor Perevertkin return ((PFN_WDFFILEOBJECTWDMGETFILEOBJECT) WdfFunctions[WdfFileObjectWdmGetFileObjectTableIndex])(WdfDriverGlobals, FileObject); 15340462c92SVictor Perevertkin } 15440462c92SVictor Perevertkin 15540462c92SVictor Perevertkin 15640462c92SVictor Perevertkin 15740462c92SVictor Perevertkin 15840462c92SVictor Perevertkin 15940462c92SVictor Perevertkin 16040462c92SVictor Perevertkin #endif // (NTDDI_VERSION >= NTDDI_WIN2K) 16140462c92SVictor Perevertkin 16240462c92SVictor Perevertkin 16340462c92SVictor Perevertkin WDF_EXTERN_C_END 16440462c92SVictor Perevertkin 16540462c92SVictor Perevertkin #endif // _WDFFILEOBJECT_H_ 16640462c92SVictor Perevertkin 167