Skip to content

Latest commit

 

History

History
148 lines (109 loc) · 5.13 KB

nf-wdfiotarget-wdfiotargetcreate.md

File metadata and controls

148 lines (109 loc) · 5.13 KB
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.WdfIoTargetCreate
WdfIoTargetCreate function (wdfiotarget.h)
The WdfIoTargetCreate method creates a remote I/O target for a specified device.
wdf\wdfiotargetcreate.htm
wdf
02/26/2018
WdfIoTargetCreate function
DFIOTargetRef_3de8d750-e0e1-4a74-8e2b-977a27db024f.xml, WdfIoTargetCreate, WdfIoTargetCreate method, kmdf.wdfiotargetcreate, wdf.wdfiotargetcreate, wdfiotarget/WdfIoTargetCreate
wdfiotarget.h
Wdf.h
Universal
1.0
2.0
DriverCreate, KmdfIrql, KmdfIrql2
Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
PASSIVE_LEVEL
Windows
WdfIoTargetCreate
wdfiotarget/WdfIoTargetCreate
APIRef
kbSyntax
LibDef
Wdf01000.sys
Wdf01000.sys.dll
WUDFx02000.dll
WUDFx02000.dll.dll
WdfIoTargetCreate

WdfIoTargetCreate function

-description

[Applies to KMDF and UMDF]

The WdfIoTargetCreate method creates a remote I/O target for a specified device.

-parameters

-param Device [in]

A handle to a framework device object.

-param IoTargetAttributes [in, optional]

A pointer to a caller-allocated WDF_OBJECT_ATTRIBUTES structure that specifies object attributes for the I/O target object. This parameter is optional and can be WDF_NO_OBJECT_ATTRIBUTES.

-param IoTarget [out]

A pointer to a location that receives a handle to an I/O target object.

-returns

WdfIoTargetCreate returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method might return one of the following values:

Return code Description
STATUS_INVALID_PARAMETER
An invalid parameter was detected.
STATUS_INSUFFICIENT_RESOURCES
There was insufficient memory to create a new I/O target object.
STATUS_INVALID_DEVICE_REQUEST
The ParentObject member of the WDF_OBJECT_ATTRIBUTES structure that IoTargetAttributes specified did not specify the framework device object that Device specified, or an object whose chain of parents leads to that object.
 

For a list of other return values that WdfIoTargetCreate can return, see Framework Object Creation Errors.

This method also might return other NTSTATUS values.

A bug check occurs if the driver supplies an invalid object handle.

-remarks

After a driver calls WdfIoTargetCreate, the driver must call WdfIoTargetOpen before it can send requests to the remote I/O target.

If the driver specifies a parent object in the WDF_OBJECT_ATTRIBUTES structure's ParentObject member, the parent object can be a framework device object or any object whose chain of parents leads to a framework device object. The framework will delete the I/O target object when it (or the driver) deletes the device object.

For more information about WdfIoTargetCreate, see Initializing a General I/O Target.

If your driver provides EvtCleanupCallback or EvtDestroyCallback callback functions for the I/O target object, note that the framework calls these callback functions at IRQL = PASSIVE_LEVEL.

For more information about I/O targets, see Using I/O Targets.

Examples

For a code example that uses WdfIoTargetCreate, see WdfIoTargetOpen.

-see-also

WDF_OBJECT_ATTRIBUTES

WdfIoTargetOpen