SimConnect_AddClientEventToNotificationGroup

 

The SimConnect_AddClientEventToNotificationGroup function is used to add an individual client defined event to a notification group.

 

Syntax
HRESULT SimConnect_AddClientEventToNotificationGroup(
      HANDLE  hSimConnect,
      SIMCONNECT_NOTIFICATION_GROUP_ID  GroupID,
      SIMCONNECT_CLIENT_EVENT_ID  EventID,
      BOOL  bMaskable = FALSE
      );

 

Parameters
Parameter Description Type
hSimConnect Handle to a SimConnect object. Integer
GroupID Specifies the ID of the client defined group. Integer
EventID Specifies the ID of the client defined event. Integer
bMaskable True indicates that the event will be masked by this client and will not be transmitted to any more clients, possibly including Microsoft Flight Simulator itself (if the priority of the client exceeds that of Flight Simulator). False is the default. See the explanation of SimConnect Priorities.

Boolean

(OPTIONAL)

 

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.

 

Example
static enum EVENT_ID {
    EVENT_1,
    EVENT_2
    EVENT_3
    }; 
static enum GROUP_ID {
    GROUP_1,
    };
hr = SimConnect_AddClientEventToNotificationGroup(hSimConnect, GROUP_1, EVENT_1);
hr = SimConnect_AddClientEventToNotificationGroup(hSimConnect, GROUP_1, EVENT_2);
hr = SimConnect_AddClientEventToNotificationGroup(hSimConnect, GROUP_1, EVENT_3, TRUE);
hr = SimConnect_SetNotificationGroupPriority(hSimConnect, GROUP_1, SIMCONNECT_GROUP_PRIORITY_HIGHEST);

 

Remarks

The maximum number of events that can be added to a notification group is 1000. A notification group is simply a convenient way of setting the appropriate priority for a range of events, and all client events (such as EVENT_1, EVENT_2, EVENT_3 in the example above) must be assigned to a notification group before any event notifications will be received from the SimConnect server.

 

See Also