SimConnect_Close

The SimConnect_Close function is used to request that the communication with the server is ended.

 

Syntax
HRESULT SimConnect_Close(
    HANDLE  hSimConnect
    );

 

Parameters
Parameter Description Type
hSimConnect Handle to a SimConnect object. Integer

 

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. This should only happen if a the hSimConnect parameter is erroneous.

 

Example
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.

 

See Also