> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IGameInputDevice::SetRawDeviceFeature

> Envía un informe de características sin procesar al dispositivo.

Envía un informe de características sin procesar al dispositivo.

## Sintaxis

```cpp theme={null}
HRESULT SetRawDeviceFeature(
    IGameInputRawDeviceReport* report
);
```

### Parámetros

*report*   \_In\_\
Tipo: [IGameInputRawDeviceReport](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)\*

El informe de características que se va a enviar. Créelo llamando a [CreateRawDeviceReport](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md) con `GameInputRawFeatureReport` y rellénelo llamando a [IGameInputRawDeviceReport::SetRawData](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_setrawdata.md).

### Valor devuelto

Tipo: HRESULT

Devuelve `S_OK` si el informe se envió al dispositivo. Devuelve `GAMEINPUT_E_AGGREGATE_OPERATION_NOT_SUPPORTED` si el dispositivo es un dispositivo agregado, u otro código de error si no se puede enviar el informe.

## Comentarios

El método `SetRawDeviceFeature` escribe un informe de características en el dispositivo. El identificador de informe se toma de la estructura [GameInputRawDeviceReportInfo](https://docs.xbox.com/es/reference/input/gameinput/structs/gameinputrawdevicereportinfo.md) del informe, y la carga útil son los datos establecidos con [IGameInputRawDeviceReport::SetRawData](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputrawdevicereport/methods/igameinputrawdevicereport_setrawdata.md).

Use [GetFeatureReportCount](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportcount.md) y [GetFeatureReportInfo](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md) para averiguar qué informes de características define un dispositivo y qué tamaño tiene cada uno. Actualmente, los informes de características se exponen para los dispositivos HID. En los dispositivos HID, el primer byte de los datos del informe es el identificador de informe.

`SetRawDeviceFeature` pone el informe en cola para su entrega y devuelve un resultado sin esperar a que el dispositivo lo procese. Un valor devuelto correcto significa que el informe se envió, no que el dispositivo lo aceptara. Para confirmar el nuevo estado, vuelva a leer el informe llamando a [GetRawDeviceFeature](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md).

```cpp theme={null}
Microsoft::WRL::ComPtr<IGameInputRawDeviceReport> report;
if (SUCCEEDED(device->CreateRawDeviceReport(reportId, GameInputRawFeatureReport, &report)))
{
    // The first byte of a HID feature report is the report ID.
    uint8_t data[] = { static_cast<uint8_t>(reportId), 0x01, 0x00 };
    if (report->SetRawData(sizeof(data), data))
    {
        device->SetRawDeviceFeature(report.Get());
    }
}
```

Para casos de uso intermedios y avanzados de la API de GameInput, consulte [Temas avanzados de GameInput](https://docs.xbox.com/es/build/core-features/common/input/advanced/input-advanced-topics.md).

## Requisitos

**Encabezado:** GameInput.h

**Biblioteca:** gameinput.lib

**Plataformas compatibles:** Windows, consolas de la familia XBOX One y consolas XBOX Series

## Consulte también

[Información general de GameInput](https://docs.xbox.com/es/build/core-features/common/input/overviews/input-overview.md)\
[GetRawDeviceFeature](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)\
[GetFeatureReportCount](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportcount.md)\
[GetFeatureReportInfo](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportinfo.md)\
[CreateRawDeviceReport](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_createrawdevicereport.md)\
[IGameInputRawDeviceReport](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputrawdevicereport/igameinputrawdevicereport.md)\
[IGameInputDevice](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Historial de versiones

| Versión | Cambios |
| - | - |
| **v4** | Se volvió a introducir. |
| **v1** | Se quitó. |
| **v0** | Se introdujo (sin implementar). |

## Apéndice: Versiones anteriores

### v0

En GameInput v0, este método se declaraba con la misma firma, pero no estaba implementado. Para obtener más información, consulte [IGameInputDevice::SetRawDeviceFeature (en desuso)](https://docs.xbox.com/es/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md).


## Related topics

- [IGameInputDevice::SetRawDeviceFeature (en desuso)](https://docs.xbox.com/es/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_setrawdevicefeature.md)
- [GameInputRawDeviceReportKind](https://docs.xbox.com/es/reference/input/gameinput/enums/gameinputrawdevicereportkind.md)
- [Miembros de la API de GameInput](https://docs.xbox.com/es/reference/input/gameinput/gameinput_members.md)
- [IGameInputDevice::GetRawDeviceFeature](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)
- [IGameInputDevice::GetFeatureReportCount](https://docs.xbox.com/es/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getfeaturereportcount.md)
