Partager via


IDirectInputDevice8::SendDeviceData Method

Sends data to a device that accepts output.

Note

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

Syntax

HRESULT SendDeviceData(
         DWORD cbObjectData,
         LPCDIDEVICEOBJECTDATA rgdod,
         LPDWORD pdwInOut,
         DWORD fl
)

Parameters

  • cbObjectData
    Size, in bytes, of a single DIDEVICEOBJECTDATA structure.
  • rgdod
    Array of DIDEVICEOBJECTDATA structures containing the data to send to the device.
  • pdwInOut
    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.
  • fl
    Flags controlling the manner in which data is sent. This can be 0 or the following value.
    • DISDD_CONTINUE
      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_INPUTLOST, DIERR_NOTACQUIRED, DIERR_REPORTFULL, DIERR_UNPLUGGED.

Remarks

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.

Requirements

Header: Declared in dinput.h.