# SimConnect_RequestAllFacilities The **SimConnect\_RequestAllFacilites** function is used to request a list of all the facilities of a given type currently in the world depending on the requested type.   ##### Syntax ``` cpp HRESULT SimConnect_RequestAllFacilites( HANDLE hSimConnect, SIMCONNECT_FACILITY_LIST_TYPE type, SIMCONNECT_DATA_REQUEST_ID RequestID ); ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |-------------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------| | hSimConnect | Handle to a SimConnect object. | Integer | | type | Specifies one member of the [`SIMCONNECT_FACILITY_LIST_TYPE`](../structures-and-enumerations/simconnect-facility-list-type/) enumeration type. | Enum | | RequestID | Specifies the client defined request ID. This will be returned along with the data. | 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 This function returns the entire list of facilities, no matter the distance to each elements. To retrieve information about facilities around you, use functions such as `SimConnect_RequestFacilitiesList_EX1` or `SimConnect_SubscribeToFacilities_EX1`.   When requesting types of facility information, one function call has to be made for each of the four types of data. The data will be returned in one of the four structures: - [`SIMCONNECT_RECV_AIRPORT_LIST`](../structures-and-enumerations/simconnect-recv-airport-list/), which will contain a list of [`SIMCONNECT_DATA_FACILITY_AIRPORT`](../structures-and-enumerations/simconnect-data-facility-airport/) structures. - [`SIMCONNECT_RECV_NDB_LIST`](../structures-and-enumerations/simconnect-recv-ndb-list/), which will contain a list of [`SIMCONNECT_DATA_FACILITY_NDB`](../structures-and-enumerations/simconnect-data-facility-ndb/) structures. - [`SIMCONNECT_RECV_VOR_LIST`](../structures-and-enumerations/simconnect-recv-vor-list/), which will contain a list of [`SIMCONNECT_DATA_FACILITY_VOR`](../structures-and-enumerations/simconnect-data-facility-vor/) structures. - [`SIMCONNECT_RECV_WAYPOINT_LIST`](../structures-and-enumerations/simconnect-recv-waypoint-list/), which will contain a list of [`SIMCONNECT_DATA_FACILITY_WAYPOINT`](../structures-and-enumerations/simconnect-data-facility-waypoint/) structures. The four list structures inherit the data from the [`SIMCONNECT_RECV_FACILITIES_LIST`](../structures-and-enumerations/simconnect-recv-facilities-list/) structure. Given that the list of returned facilities could be large, it may be split across several packets, and each packet must be interpreted separately by the client.   ##### See Also - [SimConnect API Reference](../../simconnect-api-reference/)