Mixing SDK code and PDK code in a single solution
-
- Posts: 37
- Joined: Thu Jul 20, 2017 7:15 pm
Mixing SDK code and PDK code in a single solution
I've been looking through the 4.4 SDK and it occurred to me to ask if it was possible to mix non-PDK gauge classes and PDK classes in a single Visual Studio solution. For example, you have a standard SDK gauge using simconnect that handles unsafe gear position warning and it needs to play a sound as an audible warning. Would it be possible to set an Lvar in the SDK based code and a PDK based sound gauge code picks up the Lvar value and plays (or stops playing) the sound?
- Beau Hollis
- Lockheed Martin
- Posts: 2452
- Joined: Wed Oct 06, 2010 3:25 pm
Re: Mixing SDK code and PDK code in a single solution
Yes. The HMD sample, and radar sample both provide C: variables to connect xml and/or scaleform gauges with pdk services. There is a panels services in the pdk which gives you access to capabilities you get form gauges.h in a c-gauge project. There is also a function in gauges.h for getting a pointer to the PDK service provider so that you can request and use PDK services from your existing gauge projects.
Thanks
Thanks
Beau Hollis
Prepar3D Software Architect
Prepar3D Software Architect
-
- Posts: 37
- Joined: Thu Jul 20, 2017 7:15 pm
Re: Mixing SDK code and PDK code in a single solution
Thank you for the fast answer!
Re: Mixing SDK code and PDK code in a single solution
I use the PDK in gauges all the time.
Jonathan Bleeker
Milviz systems dev
Formerly known as Naruto-kun
Milviz systems dev
Formerly known as Naruto-kun
-
- Posts: 37
- Joined: Thu Jul 20, 2017 7:15 pm
Re: Mixing SDK code and PDK code in a single solution
Yea, I'm a year and a half on a development project and I'm still learning! <laughing> When I understand what can be done it's helps speed things up. I do miss std::shared_ptr and unique_ptr, but CComPtr will do when I can't use them.