# SimConnect_SetInputEvent The **SimConnect\_SetInputEvent** function is used to set the value of a specific input event (identified by its hash). See [SimConnect\_EnumerateInputEventParams](simconnect-enumerateinputeventparams/) for an example of use.   ##### Syntax ``` cpp HRESULT SimConnect_SetInputEvent( HANDLE hSimConnect, DWORD Hash, DWORD cbUnitSize, PVOID Value ) ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |---------------|----------------------------------------------------|--------------| | `hSimConnect` | Handle to a SimConnect object. | Integer | | `Hash` | Hash ID that will identify the desired inputEvent. | Integer | | `cbUnitSize` | Specifies the size of the value in bytes. | Integer | | `Value` | New value of the specified inputEvent. | Float/String | {{< /table-wrapper >}}   ##### Return Values The function returns an **HRESULT**. Possible values include, but are not limited to, those in the following table. {{< table-wrapper >}} | Return value | Description | |--------------|-------------------------| | S\_OK | The function succeeded. | | E\_FAIL | The function failed. | {{< /table-wrapper >}}   This function might throw one of the following `SIMCONNECT_EXCEPTION`: - `SIMCONNECT_EXCEPTION_ERROR` in case of internal errors. - `isSIMCONNECT_EXCEPTION_SET_INPUT_EVENT_FAILED` if the given hash in wrong.   ##### Remarks This function will set the value of an input event and generates no response event. You can get the hashes for the available input events using [`SimConnect_EnumerateInputEvents`](simconnect-enumerateinputevents/).