SimConnect_RemoveClientEvent
The SimConnect_RemoveClientEvent function is used to remove a client defined event from a notification group.
Syntax
HRESULT SimConnect_RemoveClientEvent(
HANDLE hSimConnect,
SIMCONNECT_NOTIFICATION_GROUP_ID GroupID,
SIMCONNECT_CLIENT_EVENT_ID EventID
);
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 ID that is to be removed from the group. | 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. |
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_RemoveClientEvent(hSimConnect, GROUP_1, EVENT_2);
Remarks
Use this function to permanently remove the client event. There is no reliable procedure to temporarily turn off a client event.
See Also
- SimConnect API Reference
- SimConnect_AddClientEventToNotificationGroup
- SimConnect_SetNotificationGroupPriority
- SimConnect_ClearNotificationGroup