SimConnect_EnumerateSimObjectsAndLiveries
The SimConnect_EnumerateSimObjectsAndLiveries function is used to retrieve the list of spawnable SimObjects (and the name of their livery if applicable) that can be used with SimConnect_AICreate_* functions.
Syntax
HRESULT SimConnect_EnumerateSimObjectsAndLiveries(
HANDLE hSimConnect,
SIMCONNECT_DATA_REQUEST_ID RequestID,
SIMCONNECT_SIMOBJECT_TYPE Type
);
Parameters
| Parameter | Description | Type |
|---|---|---|
| hSimConnect | Handle to a SimConnect object. | Integer |
| RequestId | Specifies the client defined request ID. | Integer |
| Type |
Specifies the type of SimObjects that will be retrieved by the function:
|
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 should be used to retrieve the list of spawnable SimObjects (and the name of their liveries if applicable) that are mandatory information used by SimConnect_AICreate* functions. This function can send two kinds of messages :
- A
SIMCONNECT_RECV_ENUMERATE_SIMOBJECT_AND_LIVERY_LISTmessage which contains the list (or a part of the list) of all possible combinations. - A
SIMCONNECT_EXCEPTIONmessage with theSIMCONNECT_EXCPETION_INTERNALID, which implies that something went wrong while creating the list to retrieve to the client (which should never happen).