I'm trying to get started on FSX coding using SimConnect but ran into some problem. I wan't to receive information when the users flying in FSX pass some gates I've placed in a mission I created. The mission is constructed as one of the default tutorials where the users is instructed to fly through gates that are green and they will turn red when the user passes the gate. I get the desired behavior in the mission but I only receive information about the first action being executed in FSX, not the following.I tell SimConnect that I want to receive information about when Actions are executed like this: (same way as in the Sample Mission Action for that matter)
hr = SimConnect_SubscribeToSystemEvent(hSimConnect, EVENT_MISSION_ACTION, "CustomMissionActionExecuted");
The code in the callback function looks like this:
void CALLBACK MyDispatchProcMA(SIMCONNECT_RECV* pData, DWORD cbData, void *pContext){HRESULT hr; switch(pData->dwID) { case SIMCONNECT_RECV_ID_CUSTOM_ACTION: { SIMCONNECT_RECV_CUSTOM_ACTION *pCustomAction = (SIMCONNECT_RECV_CUSTOM_ACTION *)pData; }... }
but as I said, I only get to the case statement once no matter if more actions are fired in FSX.Does anyone have a clue what I might do wrong?