49#if (FX_CORE_MODE == FX_CORE_USER_MODE)
62#if (FX_CORE_MODE == FX_CORE_USER_MODE)
98 if( pFileObject !=
NULL ) *pFileObject =
NULL;
106 if( pWdmFileObject ==
NULL ) {
121 "WdfFileObjectWdfCanUseFsContexts is specified, but the Create "
122 "IRP %p doesn't have a fileObject\n",
143 pfo->DeleteFromFailedCreate();
157 pfo->SetFileObjectContext(pWdmFileObject,
163 if( pFileObject !=
NULL ) {
202 if( pWdmFileObject ==
NULL &&
213 "PFILE_OBJECT in close IRP is NULL, *Possible Leak of FxFileObject*\n");
247 "Could not find WDFFILEOBJECT for PFILE_OBJECT 0x%p",
251 "Did a different PFILE_OBJECT get passed to "
252 "IRP_MJ_CLOSE than did to IRP_MJ_CREATE?");
299 *ppFxFileObject =
NULL;
303 if( pWdmFileObject ==
NULL ) {
320 *ppFxFileObject =
NULL;
325 "NULL passed for PFILE_OBJECT when FileObject "
326 "support is requested in an I/O request");
361 if(pWdmFileObject ==
NULL) {
377 if(
f->m_FileObject.GetFileObject()== pWdmFileObject ) {
405 "The PFILE_OBJECT 0x%p in this request (cleanup/close) "
406 "is different from the one specified in "
407 "create request 0x%p.This is bad!", pWdmFileObject,
408 ((
f !=
NULL) ?
f->m_FileObject.GetFileObject():
NULL));
410 "Since this is a serial port device, framework is "
411 "using a workaround to allow this");
424 "Could not locate WDFFILEOBJECT for "
425 "PFILE_OBJECT 0x%p",pWdmFileObject);
428 "Did a different PFILE_OBJECT get passed to the "
429 "request than was to IRP_MJ_CREATE?");
452 *ppFxFileObject =
pfo;
536 return GetDevice()->m_PkgGeneral->GetConstraintsHelper(ExecutionLevel, SynchronizationScope);
__inline MxDeviceObject * GetMxDeviceObject(VOID)
__inline BOOLEAN IsExclusive(VOID)
LIST_ENTRY m_FileObjectListHead
static _Must_inspect_result_ NTSTATUS _CreateFileObject(__in FxDevice *pDevice, __in MdIrp Irp, __in WDF_FILEOBJECT_CLASS FileObjectClass, __in_opt PWDF_OBJECT_ATTRIBUTES pObjectAttributes, __in_opt MdFileObject pWdmFileObject, __deref_out_opt FxFileObject **ppFxFileObject)
VOID GetConstraints(__in WDF_EXECUTION_LEVEL *ExecutionLevel, __in WDF_SYNCHRONIZATION_SCOPE *SynchronizationScope)
VOID DeleteFileObjectFromFailedCreate(VOID)
UNICODE_STRING m_FileName
static _Must_inspect_result_ NTSTATUS _GetFileObjectFromWdm(__in FxDevice *pDevice, __in WDF_FILEOBJECT_CLASS FileObjectClass, __in_opt MdFileObject pWdmFileObject, __deref_out_opt FxFileObject **ppFxFileObject)
static VOID _DestroyFileObject(__in FxDevice *pDevice, __in WDF_FILEOBJECT_CLASS FileObjectClass, __in_opt MdFileObject pWdmFileObject)
MxFileObject m_FileObject
_Must_inspect_result_ FxCallbackLock * GetCallbackLockPtr(__deref_out_opt FxObject **LockObject)
FxFileObject(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in MdFileObject pWdmFileObject, __in FxDevice *Device)
FxFileObject * m_RelatedFileObject
_Must_inspect_result_ NTSTATUS QueryInterface(__in FxQueryInterfaceParams *Params)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
VOID MarkNoDeleteDDI(__in FxObjectLockState State=ObjectLock)
VOID DeleteFromFailedCreate(VOID)
virtual _Must_inspect_result_ NTSTATUS QueryInterface(__in FxQueryInterfaceParams *Params)
DEVICE_TYPE GetDeviceType(VOID)
VOID SetFsContext2(_In_ PVOID Value)
__inline VOID SetFileObject(_In_ MdFileObject FileObject)
VOID SetFsContext(_In_ PVOID Value)
PVOID GetFsContext2(VOID)
#define NT_SUCCESS(StatCode)
#define RemoveEntryList(Entry)
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
WDF_FILEOBJECT_CLASS normalizedFileClass
BOOLEAN __inline FxIsFileObjectOptional(__in WDF_FILEOBJECT_CLASS FileObjectClass)
WDF_FILEOBJECT_CLASS __inline FxFileObjectClassNormalize(__in WDF_FILEOBJECT_CLASS FileObjectClass)
FxVerifierDbgBreakPoint(pFxDriverGlobals)
#define FILE_DEVICE_SERIAL_PORT
PFILE_OBJECT MdFileObject
#define _Must_inspect_result_
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define STATUS_DEVICE_CONFIGURATION_ERROR
static unsigned __int64 next
#define TRACE_LEVEL_WARNING
#define TRACE_LEVEL_VERBOSE
#define TRACE_LEVEL_ERROR
_Must_inspect_result_ BOOLEAN IsVersionGreaterThanOrEqualTo(__in ULONG Major, __in ULONG Minor)
struct _LIST_ENTRY * Flink
#define LockObject(Object)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
enum _WDF_FILEOBJECT_CLASS WDF_FILEOBJECT_CLASS
@ WdfFileObjectWdfCanUseFsContext
@ WdfFileObjectNotRequired
@ WdfFileObjectWdfCanUseFsContext2
@ WdfFileObjectWdfCannotUseFsContexts
WDF_EXTERN_C_START enum _WDF_EXECUTION_LEVEL WDF_EXECUTION_LEVEL
enum _WDF_SYNCHRONIZATION_SCOPE WDF_SYNCHRONIZATION_SCOPE
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList