SimConnect_CameraRelease
The SimConnect_CameraRelease function is used to release a previously acquired camera when no longer required or for other systems to acquire it.
Syntax
HRESULT SimConnect_CameraRelease(
HANDLE hSimConnect,
const char * CameraDefName
);
Parameters
| Parameter | Description | Type |
|---|---|---|
| hSimConnect | Handle to a SimConnect object. | Integer |
| CameraDefName | The name of the defined camera to which the simulation should switch once the add-on camera is released. If not specified, the simulation will go back to the camera being used before the add-on camera was acquired. | 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. |
Example
SimConnect_CameraRelease(hSimConnect, "Pilot"); // Will switch to camera Pilot
SimConnect_CameraRelease(hSimConnect, ""); // Will switch to last selected camera
Remarks
Note that if the add-on camera has not been acquired previously, then a SIMCONNECT_EXCEPTION_CAMERA_API exception will be sent (see SIMCONNECT_EXCEPTION for more information).
Related Topics
0/255