No, because the library name is part of the symbol name. So in one class file youâd have (very simplified):
using Microsoft.FlightSimulator.Simconnect;
...
class MSFSConnection
{
private SimConnect _sc;
public bool Connect(System.IntPtr myWindow)
{
bool retVal = false;
try{
_sc = new SimConnect("My App Connection", myWindow, WM_USER_SIMCONNECT, null, 0);
retVal = true;
}catch(ComException) {}
return retVal;
}
}
And in another:
using LockheedMartin.Prepar3D.Simconnect;
...
class P3DConnection
{
private SimConnect _sc;
public bool Connect(System.IntPtr myWindow)
{
bool retVal = false;
try{
_sc = new SimConnect("My App Connection", myWindow, WM_USER_SIMCONNECT, null, 0);
retVal = true;
}catch(ComException) {}
return retVal;
}
}
Obviously you need to add both DLLs as dependencies in the project, which means theyâll both be included in the compiled output. You donât need to worry about which one to copy.
For the user itâs just a matter of clicking âConnect to MSFSâ or âConnect to P3Dâ (or however you want to make your UI). When you know which sim, you can call the appropriate routines (or you can call them through an abstract base class, which is more elegant, but a bit more work. )
The DLLs are very much not binary compatible. They implement the same interface is all, otherwise they should be regarded as totally different animals, at least internally.
By using two sims âin parallelâ, if you mean running both at the same time, I donât imagine that happens very often, not on the same computer anyway. Although across multiple PCs it could happen, especially in test or QA environments. This would only allow one connection at a time, but personally, Iâve never been asked to support simultaneous connections to multiple sims, so I donât think itâs an issue. If you mean having both sims installed and switching between them at different times, then yes I think thatâs likely. If you pay heed to the tantrum threads in this forum, then it may even be quite common (âwaaah MSFS is rubbish, Iâm going back to P3D/X-Plane/FSX/LegosâŠâ)