Hi all,
I am working on a C# project which has progressed significantly.
I need to retrieve DIS related data from simconnect such as entity Id, site Id e.t.c. I read a discussion in this forum which mentioned IDISManagerV450 to get DIS related data. How can I call APIs implemented in IDISManagerV450 from a C# project?
How to get IDISManagerV450 in C# application.
-
- Posts: 10
- Joined: Sat May 02, 2020 6:32 am
- Brady Butler
- Lockheed Martin
- Posts: 965
- Joined: Tue May 09, 2017 5:31 pm
Re: How to get IDISManagerV450 in C# application.
Hello sunilhalvi,
There's no built-in way to do access this data in C# from the SDK. There are a few options where you can create wrappers around a C++ API and convert it either into .NET types or C-style functions to access it in C#.
Regards,
Brady
There's no built-in way to do access this data in C# from the SDK. There are a few options where you can create wrappers around a C++ API and convert it either into .NET types or C-style functions to access it in C#.
Regards,
Brady
Brady Butler
Prepar3D® Software Engineer
Prepar3D® Software Engineer
-
- Posts: 10
- Joined: Sat May 02, 2020 6:32 am
Re: How to get IDISManagerV450 in C# application.
Hi Brady Butler,
Thank you for your reply, I am working on creating a c++ dynamic library just for calling GetEntityIdByObjectId().
For achieving that I'm going through the Prepar3D website which explains working with PDK, there it is mentioned that "To register your SimObject class, you must first obtain a reference to the Prepar3D Developer Kit interface."
In c++ PDK sample project reference to the P3D developer Kit interface is obtained through parameters of DLLStart() function. In my case, I don't want my library to be called by prepar3D, so I don't have DLLStart() in my library. How can I get reference to the P3D developer kit Interface?
Thank you for your reply, I am working on creating a c++ dynamic library just for calling GetEntityIdByObjectId().
For achieving that I'm going through the Prepar3D website which explains working with PDK, there it is mentioned that "To register your SimObject class, you must first obtain a reference to the Prepar3D Developer Kit interface."
In c++ PDK sample project reference to the P3D developer Kit interface is obtained through parameters of DLLStart() function. In my case, I don't want my library to be called by prepar3D, so I don't have DLLStart() in my library. How can I get reference to the P3D developer kit Interface?
- Brady Butler
- Lockheed Martin
- Posts: 965
- Joined: Tue May 09, 2017 5:31 pm
Re: How to get IDISManagerV450 in C# application.
Hello sunilhalvi,
I'm not sure that I understand what you're asking, but it sounds like you may be looking for something like SimConnect to manipulate/read the data from the simobjects instead of the PDK.
Regards,
Brady
I'm not sure that I understand what you're asking, but it sounds like you may be looking for something like SimConnect to manipulate/read the data from the simobjects instead of the PDK.
Regards,
Brady
Brady Butler
Prepar3D® Software Engineer
Prepar3D® Software Engineer
-
- Posts: 10
- Joined: Sat May 02, 2020 6:32 am
Re: How to get IDISManagerV450 in C# application.
My primary aim is to obtain DIS IDs like entity ID, site ID, exercise ID e.t.c in a c# project which is already using simconnect.dll. As I didn't find any help from simconnect.dll, I started focusing on IDISManagerV450, which is a c++ interface class. So now, I want to create a c++ dll which will call getentityIDbyObjectID() API, which is defined in IDISManagerV450. My C# project will use c++ dll to obtain DIS IDs.
What I'm asking for is:- How to get the reference to the P3D developer Kit interface(the IPdk), which sample codes get through parameters of DLLStart() function. (STDMETHODIMP_(void) DLLStart(__in __notnull IPdk* pPdk))
What I'm asking for is:- How to get the reference to the P3D developer Kit interface(the IPdk), which sample codes get through parameters of DLLStart() function. (STDMETHODIMP_(void) DLLStart(__in __notnull IPdk* pPdk))