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.
Can PDK services be accessed from an outside application?
-
- Posts: 5
- Joined: Wed Aug 07, 2019 1:39 pm
Re: Can PDK services be accessed from an outside application?
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.
I think you have the concept right. A dll to be the go between P3D and your c# app.
Ron
-
- Posts: 5
- Joined: Wed Aug 07, 2019 1:39 pm
Re: Can PDK services be accessed from an outside application?
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.
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.