Description
The BindToDeviceContext method is called once during the creation of the device object, to pass in the instance of the IDeviceContext object which has been allocated for this device. The DeviceContext object manages the execution of this device, and stores information on its current execution state. See the Plugin Model document for more information on the role of the IDeviceContext interface, and the stages of device initialization.
Note that the Device base class implements this method, and stores a reference to the object. If a device derives from this base class, it can retrieve the object by calling the GetDeviceContext method on the Device base class.
Usage
virtual bool BindToDeviceContext(IDeviceContext* adeviceContext);
Argument list
- adeviceContext [IDeviceContext*]
- The instance of the IDeviceContext object which has been created to manage this device
Return value
- [bool]
- True if the interface was bound successfully, false otherwise. If a device returns false from this method, the creation of the device object will be considered to have failed, and the destructor of the device object will immediately be called.