[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]
The CreateRemoteTarget method creates a remote target object that represents a remote I/O target.
HRESULT CreateRemoteTarget( IUnknown *pCallbackInterface, IWDFObject *pParentObject, IWDFRemoteTarget **ppRemoteTarget );
A pointer to an optional, driver-supplied callback interface. The IUnknown::QueryInterface method of this interface must return a pointer to the driver's IRemoteTargetCallbackRemoval interface, if the driver supports that interface. This parameter is optional and can be NULL.
A pointer to a framework object. If the driver provides this optional pointer, the specified object becomes the parent of the new remote target object. If this parameter is NULL, the device object that provides the IWDFDevice2 interface becomes the parent. The framework will delete the remote target object when it deletes the parent object.
A pointer to a location that receives a pointer to the IWDFRemoteTarget interface of the new remote target object.
CreateRemoteTarget returns S_OK if the operation succeeds. Otherwise, the method might return the following value:
||The framework's attempt to allocate memory failed.|
||The pParentObject parameter did not specify the device object that provides the IWDFDevice2 interface or an object whose chain of parents leads to that object.|
This method might return one of the other values that Winerror.h contains.
After your driver has called CreateRemoteTarget, the driver can open the remote target by calling either IWDFRemoteTarget::OpenRemoteInterface (to open a device interface) or IWDFRemoteTarget::OpenFileByName (to open a file).
If the driver uses the pParentObject parameter to specify a parent object, the parent object can be the device object that provides the IWDFDevice2 interface, or it can be any object whose chain of parents leads to that device object. The framework will delete the remote target object when it (or the driver) deletes the device object.
For more information about remote I/O targets, see Using I/O Targets in UMDF.
|End of support||Unavailable in UMDF 2.0 and later.|
|Minimum UMDF version||1.9|
|Header||wudfddi.h (include Wudfddi.h)|