# SimConnect_Close The **SimConnect\_Close** function is used to request that the communication with the server is ended.   ##### Syntax ``` cpp HRESULT SimConnect_Close( 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. This should only happen if a the `hSimConnect` parameter is erroneous. | {{< /table-wrapper >}}   ##### Example ``` cpp hr = SimConnect_Close(hSimConnect); ```   ##### Remarks When a SimConnect client is closed, the server will remove all objects, menu items, group definitions and so on, defined or requested by that client, so there is no need to remove them explicitly in the client code.