Page 1 of 1

SimConnect

PostPosted: Fri Jan 29, 2016 9:26 am
by Steve Waite
Why do some addons supply their own SimConnect dll?
These are not x86 applications like .exe apps. For example, these might use .NET and they must carry their own copy of the SimConnect dll from the SDK, and install into their own folder. A suite of apps could use that one dll, but mostly we see the dll supplied in the installation of the addon. These are heavyweight apps and use far more resources than the exe apps but they should work the SimConnect interface just as well.

Very differently - the x86 SimConnect dlls install into the system and only appear once on the system.

SimConnect is a wrapper for Windows Network Pipes. The simulator code contains the Pipe Server implementation, and the client program accesses the code via an installed .dll file. The .dll essentially describes a list of functions available to the client (addon app) from the server (FS).

The addon app is written to comply with the available functionality described in the .dll file. There can be any number of SimConnect .dll files installed in a system as they do not represent any additional overhead, the code is already installed and running in the sim and in Windows.

When we install a SimConnect version (or .msi), the .dll is added to the WinSxS folder, and the environment settings are made so that an addon app finds the .dll without having to know the path. If we uninstall SimConnect versions, we only remove the environment variable from the system, we don't delete the .dll file.

If we install P3D on a new system, we only get one SimConnect version installed:
microsoft.esp.simconnect: 1.0.20.0, Simconnect.dll: 1.0.195.0 <- P3D version
(latest versions of P3D after v3 do not install any simconnects they must be manually added)

If we install Steam edition FSX-SE on a new system we get two versions installed:
microsoft.flightsimulator.simconnect: 10.0.62615.0, Simconnect.dll: 10.0.62615.0 <- FSX-SE version (current)
microsoft.flightsimulator.simconnect: 10.0.61259.0, Simconnect.dll: 10.0.61637.0 <- FSX XPack version

If we install FSX+A (FSX Gold) on a new system we get three versions installed:
microsoft.flightsimulator.simconnect: 10.0.60905.0, Simconnect.dll: 10.0.60905.0 <- FSX RTM version
microsoft.flightsimulator.simconnect: 10.0.61242.0, Simconnect.dll: 10.0.61355.0 <- FSX SP1 version
microsoft.flightsimulator.simconnect: 10.0.61259.0, Simconnect.dll: 10.0.61637.0 <- FSX XPack version

If we intend to use FSX style addons they may very well require one of the three SimConnect versions: 60905, 61242, 61259. For example, the PMDG requires 61259, and other addons that work with the PMDG can also utilise versions 60905 and 61242. Indeed, PMDG state this fact in their P3D documentation as a requirement of operation.

If we only installed P3D on a fresh system we should also install 60905, 61242, and 61259.

If we only installed FSX-SE on a fresh system we should also install 60905, and 61242.

If we already installed FSX, FSX Deluxe, SP1, SP2, Acceleration, or FSX Gold, we would have one two or three versions installed already. Therefore we need not install any more SimConnect versions if we subsequently install P3D or FSX-SE on a previously fully configured FSX system. Never uninstall SimConnect versions.


The P3D installation adds the folder:
C:\Program Files (x86)\Lockheed Martin\Prepar3D v3\redist\Interface
This folder contains the three SimConnect versions required by legacy addons.

The FSX-SE installation adds the folder:
C:\Program Files (x86)\Steam\SteamApps\common\FSX\SDK\Core Utilities Kit\SimConnect SDK\LegacyInterfaces
This folder contains the three SimConnect versions required by legacy addons.


Ideal Flight 10 and Ideal Flight 10 - Special Edition, and Ideal Flight 10 Professional, utilise the SimConnect version that installs with your simulator.

P3D: On a fresh system we only need install P3D and then install IF10 Pro and IF10 Pro uses that version. No further user intervention is required unless using other addons. For the purposes of evaluation and testing, IF10 Pro setup has the option of using legacy SimConnect 61259.

FSX-SE: On a fresh system we only need install FSX-SE and then after having ensured FSX-SE has been run once (it installs SimConnect during this first run) then install IF10 and the SimConnect version in use is found and IF10 uses that. No further user intervention is required unless using other addons. If the FSX-SE EULA comes up at any time that is saying a version update will install. After which, we must run IF10 update again for it to discover the changes. Other apps may need new versions from the manufacturer, but IF10 setup seeks to discover the differences in the updates to FSX-SE and make the changes with the IF10 setup program Update button.

Beyond:
New simulators may utilise 64bit capability but they can still provide functionality for 32bit applications. During the beta testing of DTG FSW the SimConnect module could be directly linked and communicate quite normally with a 32bit application. SimConnect is a network protocol and works independent of address width (32/64bit).


SimConnect Networking:

This is what I did to test the SimConnect network:

On the server PC (ip=192.168.1.124) I installed FSX Gold, FSX-SE, P3D v2 and P3D v3. On the server I made a file called Simconnect.xml in \Users\[you]\AppData\Roaming\Microsoft\FSX, FSX-SE, and ..\Lockheed Martin\Prepar3D v2, and v3.

Code: Select all
<SimBase.Document Type="SimConnect" version="1,0">
   <Descr>SimConnect</Descr>
   <Filename>SimConnect.xml</Filename>

   <SimConnect.Comm>
      <Disabled>False</Disabled>
      <Protocol>IPv4</Protocol>
      <Scope>Global</Scope>
      <MaxClients>64</MaxClients>
      <Address>192.168.1.124</Address>
      <Port>1025</Port>
      <MaxRecvSize>4096</MaxRecvSize>
      <DisableNagle>False</DisableNagle>
   </SimConnect.Comm>

   <SimConnect.Comm>
      <Disabled>False</Disabled>
      <Protocol>Auto</Protocol>
      <Scope>Local</Scope>
   </SimConnect.Comm>

</SimBase.Document>


You would substitute with your server ip in the <Address> line.
<Port>1025</Port> - the free ip port to use - any port over 1024 except 8080.

On the client PC (ip=192.168.1.125) I made a User with the same name and password in the same workgroup as the server PC User.

On the client and server PC's I have SimConnect versions 10.0.60905.0, 61242, 61259, 62615, and 1.0.20.0 installed.

On the client PC I placed a file in C:\Users\[you]\Documents called Simconnect.cfg

Code: Select all
[SimConnect]
Protocol=IPv4
Address=192.168.1.124
Port=1025
MaxReceiveSize=4096
DisableNagle=0


You would substitute with your server ip in the Address= line.
Port= the server ip port - any port over 1024 except 8080.

I compiled SimConnect clients to return the sim version data, one for each version of SimConnect. I ran each sim on the server, one after the other and connected with the respective clients for each sim, from the client PC, which all returned the data correctly.

Both PCs had regular Users, with no adjustments to UAC privileges or permissions at all. Both were running McAffee A-V and Internet security suites in stock setup.