Can PDK services be accessed from an outside application?

obrian.cox
Posts: 5
Joined: Wed Aug 07, 2019 1:39 pm

Can PDK services be accessed from an outside application?

Postby obrian.cox » Fri Aug 16, 2019 8:52 pm

After a lot of research and fiddling, I've noticed that the PDK Services libraries are closed off to applications running outside of Prepar3D's .exe. This is mostly due to the COM servers not having an outside-accessible GUID (as far as I can tell, feel free to correct me).

What I'm trying to do is pipe data from an Application to a .dll that is running in-process alongside Prepar3D. I'm definitely not a C# programmer, so COM servers are not within my purview of knowledge.

Currently, it looks like I may have to create a proxy .dll that links with the .dll running in-process. What I'm wondering is if there might be a more elegant solution to this, or if there is information that I'm overlooking in regards to how .dll's work in general.

User avatar
ronh991
Posts: 713
Joined: Sat Jan 19, 2013 1:46 am
Location: Ontario, Canada

Re: Can PDK services be accessed from an outside application?

Postby ronh991 » Sun Aug 18, 2019 6:10 pm

If you are use c# as a dll. Do you understand managed and non managed code? You will have to do a lot of marshalling to get things to work. So not only COM, but c and c++ type of programming may be required. Have not tried this myself, PDK is really low level access to P3D.

I think you have the concept right. A dll to be the go between P3D and your c# app.
Ron

Aspiring Prepar3d beta tester

obrian.cox
Posts: 5
Joined: Wed Aug 07, 2019 1:39 pm

Re: Can PDK services be accessed from an outside application?

Postby obrian.cox » Fri Sep 06, 2019 7:41 pm

For anyone wondering if I've figured anything out, I chose to go with sockets and bypass P3D's communication limitations altogether.

Essentially, I open a new thread inside the .dll that runs a server listening to a socket. I pipe the data from the application's client to the server running in the .dll within P3D, and do what I need to with it from there.


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 4 guests