SimConnect_EnumerateControllers
The SimConnect_EnumerateControllers function is used to retrieve a list of every device that is currently plugged into the simulation.
Syntax
SIMCONNECTAPI SimConnect_EnumerateControllers(
HANDLE hSimConnect
);
Parameters
Parameter | Description | Type |
---|---|---|
hSimConnect |
Handle to a SimConnect object. | Integer |
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. |
Remarks
This function will generate a SIMCONNECT_RECV_CONTROLLERS_LIST
response (with the ID SIMCONNECT_RECV_ID_CONTROLLERS_LIST
), which will contain a list SIMCONNECT_CONTROLLER_ITEM
structs.
Might throw the following exception:
SIMCONNECT_EXCEPTION_ERROR
- an internal error occurs or if no devices are plugged
See Also