SimConnect RECV_ID_OPEN then immediately RECV_ID_QUIT

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Locked
space55
Posts: 3
Joined: Tue Mar 07, 2017 2:46 am

SimConnect RECV_ID_OPEN then immediately RECV_ID_QUIT

Post by space55 »

Hello

A program I'm writing that uses SimConnect is getting a RECV_ID_OPEN and then a RECV_ID_QUIT. How can I troubleshoot this?

I'm running Windows 7 x64, and another system I've tried is running Windows 10 x64, P3D V3.4 and V3.3

Code on Pastebin:
https://pastebin.com/hg15EyaL

Thanks!
User avatar
Rob McCarthy
Lockheed Martin
Posts: 3704
Joined: Wed Aug 24, 2011 1:37 pm

Re: SimConnect RECV_ID_OPEN then immediately RECV_ID_QUIT

Post by Rob McCarthy »

Are you seeing your SimConnect application successfully connect to Prepar3D? Are the examples we provide in the SDK working correctly for you?

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
space55
Posts: 3
Joined: Tue Mar 07, 2017 2:46 am

Re: SimConnect RECV_ID_OPEN then immediately RECV_ID_QUIT

Post by space55 »

Rob McCarthy wrote: Tue Aug 22, 2017 1:27 pm Are you seeing your SimConnect application successfully connect to Prepar3D? Are the examples we provide in the SDK working correctly for you?

Regards,
Rob McCarthy
Hello

Yes, the SC application connects to P3D. I have it print out the version of SimConnect in the code, and it echos a matching number.

Unfortunately, this is an example from the SDK. Granted, there's a little bit extra, but it's been commented out. Everything is the same except for some additional print statements for debugging purposes.

Thanks!
User avatar
ronh991
Posts: 724
Joined: Sat Jan 19, 2013 1:46 am
Location: Ontario, Canada

Re: SimConnect RECV_ID_OPEN then immediately RECV_ID_QUIT

Post by ronh991 »

Are you missing a few break; statements.

one before:

Code: Select all

         break;
         
        case SIMCONNECT_RECV_ID_OPEN:
and

Code: Select all

            }
            break;
        case SIMCONNECT_RECV_ID_QUIT:
            std::cout << "SC Stuffs" << std::endl;

Hmm, LM [ code ] tags don't seem to work right - everything is on one line. or am I doing something wrong
Ron
Locked