The SimConnect_FlightSave function is used to save the current state of a flight to a flight file.

 

Syntax
HRESULT SimConnect_FlightSave(
    HANDLE  hSimConnect,
    const char*  szFileName,
    const char*  szTitle
    const char*  szDescription,
    DWORD  Flags
    );

 

Parameters
ParameterDescriptionType
hSimConnectHandle to a SimConnect object.Integer
szFileNameNull-terminated string containing the path to the flight file. Flight files have the extension .FLT, but no need to enter an extension here.String
szTitleNull-terminated string containing the title of the flight file. If this is NULL then the szFileName parameter is used as the title.String
szDescriptionNull-terminated string containing the text to enter in the Description field of the flight file.String
FlagsUnused.Integer

 

Return Values

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return valueDescription
S_OKThe function succeeded.
E_FAILThe function failed.

 

Remarks

Flight files can be opened using a text editor.