Microsoft DirectX 9.0

IDirectInputDevice8::SendDeviceData Method

Sends data to a device that accepts output.

Note  There are no devices that accept output from IDirectInputDevice8::SendDeviceData. See Remarks.


HRESULT SendDeviceData(      

    DWORD cbObjectData,     LPCDIDEVICEOBJECTDATA rgdod,     LPDWORD pdwInOut,     DWORD fl );


Size, in bytes, of a single DIDEVICEOBJECTDATA structure.
Array of DIDEVICEOBJECTDATA structures containing the data to send to the device.
On entry, the variable pointed to by this parameter contains the number of elements in the array pointed to by rgdod. On exit, it contains the number of elements sent to the device.
Flags controlling the manner in which data is sent. This can be 0 or the following value.
The device data sent is overlaid on the previously sent device data.

Return Value

If the method succeeds, the return value is DI_OK.

If the method fails, the return value can be one of the following error values.

DIERR_INPUTLOSTAccess to the input device has been lost. It must be reacquired.
DIERR_NOTACQUIREDThe operation cannot be performed unless the device is acquired.
DIERR_REPORTFULLMore information was requested to be sent than can be sent to the device.
DIERR_UNPLUGGEDThe operation could not be completed because the device is not plugged in.


Applications should not use IDirectInputDevice8::SendDeviceData. Force Feedback is the recommended way to send data to a device. If you want to send other data to a device, such as changing LED or internal device states, the HID application programming interface (API) is the recommended way.

© 2002 Microsoft Corporation. All rights reserved.