SimConnect_AIRemoveObject

The SimConnect_AIRemoveObject function is used to remove any object created by the client using one of the AI creation functions.

 

Syntax
HRESULT SimConnect_AIRemoveObject(
    HANDLE  hSimConnect,
    SIMCONNECT_OBJECT_ID  ObjectID,
    SIMCONNECT_DATA_REQUEST_ID  RequestID
    );

 

Parameters
Parameter Description Type
hSimConnect Handle to a SimConnect object. Integer
ObjectID Specifies the server defined object ID (refer to the SIMCONNECT_RECV_ASSIGNED_OBJECT_ID structure). Integer
RequestID Specifies the client defined request ID. 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

A client application can only remove AI controlled objects that it created, not objects created by other clients, or by the simulation itself.

 

See Also