Jump to content

PMDG SDK simconnect problem - connect to 2 aircrafts


Recommended Posts

Posted

Hello,

I have a small home cockpit and I'm tryinng to write an app to connect my cockpit with Prepar3d (PMDG 737 and 777).

My code:

	enum CLIENT_DATA_777
        {
            PMDG_777X_DATA_ID = 0x4E477831,
            PMDG_777X_DATA_DEFINITION=0x4E477832,
            PMDG_777X_CONTROL_ID	=0x4E477833,
            PMDG_777X_CONTROL_DEFINITION = 0x4E477834,
        };

	enum CLIENT_DATA_737
        {
            PMDG_NGX_DATA_ID = 0x4E477831,
            PMDG_NGX_DATA_DEFINITION=0x4E477832,
            PMDG_NGX_CONTROL_ID	=0x4E477833,
            PMDG_NGX_CONTROL_DEFINITION = 0x4E477834,
        };


(...)

simconnect_MapClientToDataName("PMDG_NGX_Data", CLIENT_DATA_737.PMDG_NGX_DATA_ID);
simconnect_MapClientToDataName("PMDG_NGX_Control", CLIENT_DATA_737.PMDG_NGX_CONTROL_ID);

simconnect_MapClientToDataName("PMDG_777X_Data", CLIENT_DATA_777.PMDG_NGX_DATA_ID);
simconnect_MapClientToDataName("PMDG_777X_Control", CLIENT_DATA_777.PMDG_NGX_CONTROL_ID);

 

The problem is an exception: DUPLICATE_ID. How to solve this? Do I have to close simconnect and open it again with settings for 737 only when 737 is loaded and the same with settings for 777 only when 777 is loaded?

Archived

This topic is now archived and is closed to further replies.

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...