Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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?

 

 

Posted
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

 

Posted

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#

 

Posted
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

 

 

 

Posted

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.

Posted
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

Posted
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

 

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

  • 2 weeks later...
Posted
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

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.