UID | title | description | old-location | tech.root | ms.date | keywords | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | f1_keywords | topic_type | api_type | api_location | api_name | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:wdfiotarget.WdfIoTargetWdmGetTargetFileObject |
WdfIoTargetWdmGetTargetFileObject function (wdfiotarget.h) |
The WdfIoTargetWdmGetTargetFileObject method returns a pointer to the Windows Driver Model (WDM) file object that is associated with a specified remote I/O target. |
wdf\wdfiotargetwdmgettargetfileobject.htm |
wdf |
02/26/2018 |
|
DFIOTargetRef_b6639c60-55f2-40be-a678-c7cf56a8e28f.xml, WdfIoTargetWdmGetTargetFileObject, WdfIoTargetWdmGetTargetFileObject method, kmdf.wdfiotargetwdmgettargetfileobject, wdf.wdfiotargetwdmgettargetfileobject, wdfiotarget/WdfIoTargetWdmGetTargetFileObject |
wdfiotarget.h |
Wdf.h |
Universal |
1.0 |
DriverCreate, KmdfIrql, KmdfIrql2 |
Wdf01000.sys (see Framework Library Versioning.) |
<=DISPATCH_LEVEL |
Windows |
|
|
|
|
|
[Applies to KMDF only]
The WdfIoTargetWdmGetTargetFileObject method returns a pointer to the Windows Driver Model (WDM) file object that is associated with a specified remote I/O target.
A handle to a remote I/O target object. This handle was obtained from a previous call to WdfIoTargetCreate.
WdfIoTargetWdmGetTargetFileObject returns a pointer to a WDM FILE_OBJECT structure.
A bug check occurs if the driver supplies an invalid object handle.
The pointer that the WdfIoTargetWdmGetTargetFileObject method returns is valid until the driver calls WdfIoTargetClose or WdfIoTargetCloseForQueryRemove, or until the remote I/O target object is deleted. If the driver provides an EvtCleanupCallback function for the remote I/O target object, and if the object is deleted before the remote I/O target is closed, the pointer is valid until the EvtCleanupCallback function returns.
If the driver attempts to access the WDM device object after it has been removed, the driver can cause the system to crash. The toastmon sample demonstrates how the driver can provide an EvtIoTargetQueryRemove callback function so that it is notified if the I/O target is removed.
For more information about WdfIoTargetWdmGetTargetFileObject, see Obtaining Information About a General I/O Target.
For more information about I/O targets, see Using I/O Targets.
The following code example obtains a pointer to the WDM file object that is associated with a remote I/O target.
PFILE_OBJECT pfileObject;
pfileObject = WdfIoTargetWdmGetTargetFileObject(IoTarget);