SimConnect_SetInputEvent
The SimConnect_SetInputEvent function is used to set the value of a specific input event (identified by its hash).
Syntax
HRESULT SimConnect_SetInputEvent(
HANDLE hSimConnect,
DWORD Hash,
DWORD cbUnitSize,
PVOID Value
)
Parameters
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 |
Return Values
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return value | Description |
---|---|
S_OK | The function succeeded. |
E_FAIL | The function failed. |
This function might throw one of the following SIMCONNECT_EXCEPTION
:
SIMCONNECT_EXCEPTION_ERROR
in case of internal errorsSIMCONNECT_EXCEPTION_GET_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
.
See Also