I have to convert a System.Guid variable to a _GUID but I don't know how.The declaration of the function (in Microsoft.FlightSimulator.SimConnect):public void ExecuteMissionAction(_GUID guidInstanceId);The guid I have: {0110DB64-FED1-4E40-A134-4F755A8245D1}

And I have an other problem. I cannot use _GUID. I added ISymWrapper to the references, but when I want to build the project I get the following message: "error CS0122: '_GUID' is inaccessible due to its protection level"

I tried Guid.ToString, but it didn't work. It sent me an error message while building the project: "error CS1503: Argument'1': cannot convert from 'string' to '_GUID'"

Also, I tried GuidConverter, which didn't work, too. GuidConverter needs a parameter of Object. I tried it, but it didn't work,too.

By the way, I'm a beginner in C#, I used to develop in Borland Delphi, so everything is new for me in C#. :-) But it is strange for me... Microsoft made an interface for developers to write their applications for FSX (Flight Simulator X), they released a SDK, but most of the examles are in C++... :-(

One more thing: I inlcuded the Simconnect .dll in my project. (using Microsoft.FlightSimulator.SimConnect;) I can use many variables and events which are described in the SDK, but I cannot use the ExecuteMissionExecute, because C# doesn't know te variable _GUID. (C++ knows it, I saw it in a sample...)

It's hard to say. I don't know how they've defined _GUID. A managed application normally uses either System.Guid or it pinvokes a function and the CLR marshals the data for you. I can't find any information about the Flight Simulator SDK; so I can't know for sure how to go back and forth from Guid to _GUID.

Now, as far as I can figure out, the _GUID is ISymWrapper and the _GUID in Microsoft.FlightSimulator.SimConnect are separate attempts to use the SDK struct GUID in managed code, and both define it as internal.