Jump to content
The simFlight Network Forums
roa

Simconnect.dll location setting

Recommended Posts

Hi Pete,

 

Do you know if there is a common folder location we can use for the new MSFS Simconnect.dll?

Or must every Simconnect client app has its own Simconnect.dll in the folder where the exe for the app is located?

 

 

Share this post


Link to post
Share on other sites
24 minutes ago, roa said:

Do you know if there is a common folder location we can use for the new MSFS Simconnect.dll?

Or must every Simconnect client app has its own Simconnect.dll in the folder where the exe for the app is located?

Up till now every 64-bit SimConnect application would need the DLL in the same folder. It might work okay by putting it in C:\Windows or one if the folders within. But I think this not worthwhile as things should change.

The next release of FSUIPC7-Beta will not need access to the DLL as MS have now released the static library which can be compiled into our program. I expect this change to be taken up by any other 64-bit programs using SimConnect.

32-bit programs like LittleNavMap can quite happily use the old FSX SimConnect installs.

Pete

 

Share this post


Link to post
Share on other sites

OK,

Thanks for the tip on the static library. I will use that in my code from now on.

Share this post


Link to post
Share on other sites

John, could you give me a hint on how to compile the static library into a C# program to avoid that the user must have the Simconnect.dll in the app folder.. I though I new how to do it, but was wrong. I have added Microsoft.FlightSimulator.Simconnect.dll to my Reference and have a "using Microsoft.FlightSimulator.SimConnect;

in my managed code c#

 

Share this post


Link to post
Share on other sites
2 hours ago, roa said:

John, could you give me a hint on how to compile the static library into a C# program to avoid that the user must have the Simconnect.dll in the app folder.. I though I new how to do it, but was wrong. I have added Microsoft.FlightSimulator.Simconnect.dll to my Reference and have a "using Microsoft.FlightSimulator.SimConnect;

I think I can answer that for John.

The static library provided in the latest SDK is for native code programs.  I'm afraid it cannot be used with Managed programs.

Pete

 

 

 

Share this post


Link to post
Share on other sites

But, the Microsoft.Flightsimulator.Simconnec.dll in the SDK's \lib\managed\ folder. I use this in my managed code and it is working, but I still need the SimConnect.dll in my app folder.

 

I thought this was the static library that could be embedded in the app code, but probably misunderstood. I see now that you meant the SimConnect.lib.

Bear with my questions, as I am just a hobby programmer.

 

I find it odd that if all apps that use managed code should need to have the SImConnect.dll included in the app folder to work.

 

There must be a common folder that can be used or a way to embed the dll.

Share this post


Link to post
Share on other sites
2 minutes ago, roa said:

There must be a common folder that can be used or a way to embed the dll.

You can try putting the dll in the Windows system folder (and reboot), but this really should be done by the SDK installer (and would then also require users of your software to also install the SDK!). The way to embed the dll is to use a static library. Seems like Asobo only provided a static library for unmanaged C/C++, maybe a static library for managed code will come later.

I think for now, you should just include the SimConnect.dll along with your application.

John

Share this post


Link to post
Share on other sites
3 hours ago, roa said:

But, the Microsoft.Flightsimulator.Simconnec.dll in the SDK's \lib\managed\ folder. I use this in my managed code and it is working, but I still need the SimConnect.dll in my app folder

Seems, then, that the Managed DLL accesses MSFS via the unmanaged DLL. Very convoluted!

At least MS has now given permission for you to include both DLLs in your packaging.

Pete

 

Share this post


Link to post
Share on other sites
On 8/19/2020 at 10:09 PM, roa said:

John, could you give me a hint on how to compile the static library into a C# program to avoid that the user must have the Simconnect.dll in the app folder.. I though I new how to do it, but was wrong. I have added Microsoft.FlightSimulator.Simconnect.dll to my Reference and have a "using Microsoft.FlightSimulator.SimConnect;

in my managed code c#

 

I suppose you could use Fody/Costura to embed the managed DLL in your app...

Share this post


Link to post
Share on other sites
On 8/20/2020 at 7:44 PM, Pete Dowson said:

At least MS has now given permission for you to include both DLLs in your packaging.

@Pete Dowson May I ask where you got this information?

Share this post


Link to post
Share on other sites
5 hours ago, CAG2 said:

May I ask where you got this information?

It was posted on the MSFS beta third party forums. The latest SDK also contains instructions on how to copy the dll to your exe location via VS post build events.

John

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.