FSX Redist Simconnect.dll

#1
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?
 
#5
@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?
 
#6
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.
 
#7
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
#8
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.
 
#9
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
#10
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.
 
#11
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.
 
#12
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