• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX Redist Simconnect.dll

Messages
78
Country
unitedkingdom
I've written an application that gains data using either Simconnect or FSUIPC.

If the end user of my application doesn't have Simconnect installed, it (obviously) throws an error that it can't find Simconnect.dll.

This happens when a user of my app is using Xplane, P3Dv4 or has no SIM at all installed.

I'm aware that the legacy versions ship with P3D, so I can try and write a check for that or I could include the Simconnect.dll in my app but am I allowed too?

I'm assuming that if the end user hasn't purchased FSX/P3D (ie an Xplane user) then they can't use Simconnect?

How do others tackle this issue?
 
Messages
2,077
Country
us-ohio
You are not allowed to distribute the DLL yourself, it is not a redistributable file.
 
Messages
78
Country
unitedkingdom
Thanks WarpD.
Does that include embedding the dll within the app, would you think?
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
@WarpD, actually there is a redist exe installer that developers are allowed to redistribute for SimConnect.
 
Messages
78
Country
unitedkingdom
@WarpD, actually there is a redist exe installer that developers are allowed to redistribute for SimConnect.

I'm just looking for the easiest way for the end user of my app to get up and running, but I don't want to break any copywrite laws etc.

I'm not charging for the app, if that makes a difference.

If I point them to the simconnect installer or even have my app run the installer, this would then install Simconnect on a system which would never be used if the user has Xplane or no sim.

My thoughts were to embed the dll into my app, meaning there was nothing the end user needed to do extra.

But am I allowed to do this?
 
Messages
2,077
Country
us-ohio
The question is whether you can redistribute the DLL. No, you can not. You can redistribute the SimConnect installer, as Jonathon has pointed out. However... if your software is being used for X-Plane and it errors out because there is no SimConnect... you need to fix your software. It should never error out because a file is missing that it's not even going to use. Distributing SimConnect is not the correct approach. Lemme guess... you did an #import on the DLL.
 
Messages
78
Country
unitedkingdom
I see your point.
If it's not needed, why am I looking for it.

No problem.
I'll write something in to ignore looking for simconnect if its not installed and let P3Dv4 users know they need to install an older version of Simconnect.

It's a C# app which is using the dll.

I was just trying to make it easy for all involved without breaking any laws.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Well, you could include the redist exe installer and have your installer auto-run it if they are installing into P3D, otherwise bypass that routine entirely.
 
Messages
78
Country
unitedkingdom
Thanks n4gix.
Yup, That's the plan.
I'll have my app look to see if P3D is installed.
If it is then is the Xpack version of simconnect installed?
If not, then offer to install it.

All seems a bit unnecessary, as I could have just included Simconnect with my app (being used or not).
But as warpD pointed out, why include something that won't be used by some.

I suppose I was just trying to cut corners and simplify things.
 

ddawson

Resource contributor
Messages
862
Country
canada
There should be no need to distribute SimConnect installers. They are shipped with the simulators.
Also, keep in mind that SimConnect is a Microsoft thing. It won't interact with X-Plane.
 
Messages
2,077
Country
us-ohio
The problem is he's using an #import macro to use the DLL. Not the best way to write a universal application. By using #import you force the requirement of the DLL's presence, even if it's actually not needed at all.
 
Messages
78
Country
unitedkingdom
All fixed.
Thanks for all the comments.
The problem was...
Although I'd added a check to not use Simconnect in certain circumstances, I had made reference to Simconnect before the check.
Because I had Simconnect installed it never flagged up for me.
It was only when a user of my app and P3Dv4 came across the error it was brought to my attention.
This then made me think that my app would always look for Simconnect if I had any reference to it, which led to my initial question.

After uninstalling Simconnect and running my code again I found the issue and have corrected it.

Again thank you for the comments, which made me look at my code differently and find the issue.
 
Top