32 - 64 Bit simconnect

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Locked
FSMP
Posts: 678
Joined: Sat Sep 25, 2010 9:38 am

Post by FSMP »

I am currently developing a on W7 64 bit system.



First, can I confirm my current understanding:



(1) P3D is a 32 Bit application and will run on a 64 bit OS in 32 Bit mode.

(2) Any Inproc dll need to be compiled as X86 (32bit) ONLY. ( Not 64 or ANY CPU) to use 32 bit simconnect.dll

(3) Any Out of Process EXE, using simconnect dll, (32 bit dll), also needs to be compiled X86 (32bit) ONLY as well.



(4) If I wanted my OUT-of-Process EXE to be a 64 Bit application, it woud need to have a 64 bit version of Simconnect.dll, as it cannot run with a 32 bit dll, and run in 64 bit mode. ?



If the above is correctly, what are the chances of P3D also suppling a 64 bit version of simconnecr.dll, so that Out-of-Process EXEs, can take advantage of running in 64 bit mode.



Is makeing 64 bit version of simconnect, just a question of compiling the dll for 64 bit CPUs, and accepting that it is not really designed to be 64 bit, but CAN be compiled as such. ?



Geoff





User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Post by Beau Hollis »

I don't think that it would be as simple as swapping a compiler flag. At the very least we would need to scrub through all the data structures in the code to verify that they are 64-bit byte-aligned. I'm not too familiar with the simconnect side of our code base, but there could be code generation and/or assembly to contend with.



Also, just for clarity sake, simconnect is now built and distributed as a static lib. Simconnect.dll only exists for legacy FSX/ESP compatibility.



Beau
Beau Hollis
Prepar3D Software Architect
FSMP
Posts: 678
Joined: Sat Sep 25, 2010 9:38 am

Post by FSMP »

Thanks Bholis

Yes, I should have been talking about the Static Lib, which I assume is 32 bit.

For 64 bit applications, will there be a 64 bit static lib, or can one use the 32 bit static lib in a 64 bit exe ?



Geoff

Sam Three Six
Posts: 2
Joined: Sun Jan 30, 2011 2:16 am

Post by Sam Three Six »

On a tangent, what is the significance of a static library versus a dynamic one? Also, do you have plans to implement 64-bit support in the next two years, if at all?



I apologize if I'm hijacking this thread, I just would like some additional clarification. 8-)



Have a blessed one!



Regards, Patrick
beatle
Posts: 88
Joined: Thu Sep 16, 2010 8:34 pm

Post by beatle »

Hey Guys,



Currently there is no client lib available for doing C++ 64-bit SimConnect clients. The replacement managed client I released for FSX-SP2/ESP does support building managed code with the AnyCPU option (I may have to break down and hand code the additions to the API to make a V1.1 compatible version :-> ).



Adding additional types of SimConnect clients to the SDK (to support using SimConnect in various embedded environments, etc) is on the list, it's just currently lower than several other things on the list :->



As to the static lib vs import lib, linking with a static lib places the actual SimConnect client code directly into your app(or DLL, whatever you are building) whereas an import lib just includes the information needed to load and link to an external DLL at runtime (so your app is dependent on that DLL having already been installed somewhere on the machine that is running your application).



Not sure if/when we might do a 64-bit version of the sim itself, need to get rid of the XP/DirectX 9 support first :-> If we went 64-bit, we would probably only provide a 64-bit version (trying to maintain dual build environment compatibility tends to be a pain).



Tim
FSMP
Posts: 678
Joined: Sat Sep 25, 2010 9:38 am

Post by FSMP »

Tim,



Putting aside the consideration of a 64 bit version of the P3d appliaction, I am still trying to undestand the rules for using a Static Library with a 64 Bit external application. I can imagine advantages of larger external application, that needs to communicate with P3d, being written to run in 64 bit mode.



So, can a 64 bit application be linked to contain a 32 bit Static Library, or does that static linked library also "HAVE" to be 64 bit.

And if so, is it really such a large task to also produce a 64bit version of the Static library. Doesn't the compiler take care of ensure the 64 bit boundaries ?



Sorry if I am talking technical nonsense, I am on a learning curve here :)



Geoff
beatle
Posts: 88
Joined: Thu Sep 16, 2010 8:34 pm

Post by beatle »

Currently there is no way to create a 64-bit C++ SimConnect client (using either our currently supplied SDK or any of the MS supplied SDKs). If you use my replacement managed library (and currently limit yourself to the API available in FSX-SP2/ESP), then you can create a managed app using the AnyCPU option.



Mostly, nobody has ever asked for a 64-bit client library before, generally SimConnect clients don't need to access that much data :->.



Tim
Locked