Jump to content
Sign in to follow this  
Guest flying-w

SimConnect Client RunTime Version

Recommended Posts

Guest flying-w

I have built a Simconnect application using managed code. In the manifest, I have the SimConnect.dll from FSX RTM, so that anyone can run the application (lowest common denominator). However that means someone with say SP2 installed is not getting the benefit of the SP2 version of SimConnect.dll, as it seems the .net framework always loads the assembly specified in the manifest.Is there a way to have .net load the latest version of simconnect that is found on a PC, while maintaining compatibility for all SimConnect versions. Or do we need to build a separate .exe for each SimCommect version and figure out what is what during installation.ThanksSimon

Share this post


Link to post
Share on other sites
Guest Daniel42

I just send you a PB on the simflight account :)In C++ Pete Dowson has done it be checking which DLL is available and then loading it runtime if I'm correct.For C# I have an idea that's not tested yet, in short: create three DLL's based upon an identical source file with one class that relays calls to SimConnect, each referencing 1 version of SimConnect and each subclassing the relay class. Then see which is the best one that connects and assign that to a global relay object in your main program.Daniel

Share this post


Link to post
Share on other sites
Guest Daniel42

A first test:- When you add an existing class to a DLL project, VS actually makes a copy of the source file. - Having 3 DLL projects in a solution that each reference a different SimConnect version does workThe idea behind sharing the source file was that you only would have to maintain one version, but then again there are API changes in the different SC versions so... the file will be different anyway.Now the solution will be:- Write a simconnect wrapper (where you will have to define all constants, enums, methods, ... or at least the ones you will be using, you can't have a 'using MS.FS.SimConnect' dependency here )- In 3 seperate DLL projects, create subclasses of the wrapper that map the wrapper methods to calls to a specific simConnect version, you must also convert your own constants to the constants of the specific simConnect version- Find out which is the 'best' dll that can call the simconnect.open method and assign this object to a global object of the wrapper baseclass- Calls to the wrapper base class should now be routed to the best subclass, referencing the best simConnect DLL- Make sure your add-on will work with the limitations of older SC'sDaniel

Share this post


Link to post
Share on other sites

>Is there a way to have .net load the latest version of>simconnect that is found on a PC, while maintaining>compatibility for all SimConnect versions. Or do we need to>build a separate .exe for each SimCommect version and figure>out what is what during installation.I don't know about managed code, but if you want a solution in C/C++ email me at petedowson@btconnect.com. The process is called "manifest probing" and involves a number of Windows API calls plus binding the Manifests of each acceptable version of SimConnect to your program as resources. I should think it would be easy enough to translate into other languages.RegardsPete


Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

Share this post


Link to post
Share on other sites

>have you developped new ways besides the ones we have>documented here last year?>>http://forums.avsim.net/dcboard.php?az=sho...g_id=969&page=2No. I'd hoped for a method which didn't make error entries in the Windows Event Log every time you probe for a version which isn't installed, but it is looking like there isn't one. Dave D. is also looking for me, but he's probably given up too.Thanks for the link, bTW, I'd gone looking for it but for some reason the number of threads here since 2008 began seems to have been severely cut. Maybe it's some setting I've got wrong.[LATER]Aha. Found it! Somehow I had it set to only list topics used in the last month! Changed it now ...RegardsPete


Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

Share this post


Link to post
Share on other sites
Guest JeanLuc_

Ok! I've not found anything myself to prevent these log entries yet either. Still trying!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 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...