# SimConnect_SubscribeToCommBusEvent The **SimConnect\_SubscribeToCommBusEvent** function is used to subscribe the client to a communication (CommBus) event to receive a `SIMCONNECT_RECV_ID_COMM_BUS` when the event is called.   **C++** **C\#** ##### Syntax ``` cpp HRESULT SimConnect_SubscribeToCommBusEvent( HANDLE hSimConnect, SIMCONNECT_CLIENT_EVENT_ID EventID, const char * EventName ); ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |---------------|------------------------------------------------------------|---------| | *hSimConnect* | Handle to a SimConnect object. | Integer | | *EventID* | Specifies the ID which will be used to identify the event. | Integer | | *EventName* | The string name for the CommBus event to subscribe to. | String | {{< /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 >}}   ##### Syntax ``` cs void SimConnect::SubscribeToCommBusEvent( Enum EventID, string EventName ); ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |-------------|--------------------------------------------------------|------| | *EventID* | Specifies the ID of the client event. | Enum | | *EventName* | The string name for the CommBus event to subscribe to. | Enum | {{< /table-wrapper >}}   ##### Return Values N/A (use a try/catch to test for errors).     ##### Remarks N/A