Jump to content
Sign in to follow this  
Guest pellelil

What is the "status" of using SimConnect with C#

Recommended Posts

Guest pellelil

I have to admit that so far I haven't even looked at the SDK (since I didn't get to install FSX until yesterday). My primary development background is with Borland Delphi, however I'm in the process of moving towards C# (MS VisualStudio). When it comes to Delphi I know how to access MSFS via FSUIPC, however as of now SimConnect is brand new to me.Searching the net for SimCommect/C# I've seen mentioning of bugs and limitaions in the .Net implementation, and problems with C# that apparently should be easier to handle with C++ (I'd realy hate to use C++ over C#).Anyone to comment on the status of "SimConnect using C#". Is it working out of the box?, or will I need some wrapper that iron out potential problems?http://jdtllc.com/images/rcv4bannerbeta.jpgPelle F. S. Liljendal

Share this post


Link to post
Share on other sites
Guest ziporama

If you want to stay in C#, it is possible to write your own wrapper for SimConnect using P/Invoke. Works well although for some of the structures returned, in particular those that contain pointers to pointers, things get a bit complex.Etienne

Share this post


Link to post
Share on other sites
Guest ziporama

There are some minor functionality differences between the unmanaged version and the managed one, but they are minimal and not typically needed (example, tagged data support).As said above, the "in the box" version works well.Etienne

Share this post


Link to post
Share on other sites
Guest cyourth

Several SimConnect methods do not work in C# yet. Examples are: 1. ExecuteMissionAction(_GUID) 2. CompleteCustomMissionActionExecute(_GUID) 3. I've been told that others exist :-hmmmNote: The _GUID data types are protected, and I still haven't found a way to access them. These methods are key, if you are trying to manage mission events via C#. The few C# examples that are supplied with the SDK, work ok...

Share this post


Link to post
Share on other sites
Guest ziporama

The gaps in the .net version of Simconnect can't easily be fixed (need to get new SP), or your can bite the bullet and use Interop to write your own subset of functions you need.Be wary however that the marshaling needed to convert the C/C++ structs to the .NET managed equivalents is often horrific, in particular because of this definite love for pointer arrays of undefined size and undefined type at compile time... These are a (reasonably) easy in C/C++, but in the managed world, even with unsafe pointers, it is entirely torturous.Etienne

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...