# SimConnect_SubscribeToFlowEvent The **SimConnect\_SubscribeToFlowEvent** function is used to receive a [SIMCONNECT\_RECV\_FLOW\_EVENT](../structures-and-enumerations/simconnect-recv-flow-event/) message when the simulation triggers some flow events, for example during a [Back On Track](../../../../content-configuration/flt-files/back-on-track/) event. - This API is available through [Wasm](../../../wasm/flow-api/flow-api/), [Javascript](../../../javascript/flow-api/) and through [SimConnect](simconnect-subscribetoflowevent/).   You can find a sample project to use as a reference when using the Flow API here: - [FlowAircraft](../../../../samples-tutorials/samples/simobjects-aircraft/modularaircraft/flowaircraft/)   ##### Syntax ``` cpp HRESULT SimConnect_SubscribeToFlowEvent( HANDLE hSimConnect ); ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |---------------|--------------------------------|---------| | *hSimConnect* | Handle to a SimConnect object. | 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 >}}