# SimConnect_FlightSave The **SimConnect\_FlightSave** function is used to save the current state of a flight to a flight file.   ##### Syntax ``` cpp HRESULT SimConnect_FlightSave( HANDLE hSimConnect, const char* szFileName, const char* szTitle const char* szDescription, DWORD Flags ); ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |-----------------|----------------------------------------------------------------------------------------------------------------------------------------------|---------| | *hSimConnect* | Handle to a SimConnect object. | Integer | | *szFileName* | Null-terminated string containing the path to the flight file. Flight files have the extension .FLT, but no need to enter an extension here. | String | | *szTitle* | Null-terminated string containing the title of the flight file. If this is NULL then the szFileName parameter is used as the title. | String | | *szDescription* | Null-terminated string containing the text to enter in the Description field of the flight file. | String | | *Flags* | Unused. | Integer | {{< /table-wrapper >}}   ##### Return Values The function returns an **HRESULT**. Possible values include, but are not limited to, those in the following table. {{< table-wrapper >}} | Return value | Description | |--------------|-------------------------| | S\_OK | The function succeeded. | | E\_FAIL | The function failed. | {{< /table-wrapper >}}   ##### Remarks Flight files can be opened using a text editor.