Jump to content
The simFlight Network Forums

Simconnect.dll location setting


roa

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?

 

 

Link to comment
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

 

Link to comment
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#

 

Link to comment
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

 

 

 

Link to comment
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.

Link to comment
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

Link to comment
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

 

Link to comment
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...

Link to comment
Share on other sites

  • 2 weeks later...

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