• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Simconnect hep - inter-process

Messages
497
Country
unitedstates
I could really do with some help, trying to figure out howto get an Out-of_process, C# managed code exe, to communicate with, and call a function in an in-process dll. :confused:

I am told it can be done, but is difficult. I am hoping someone has already figured this out, and can help me. Like most things, once you know how to do it, it's relatively easy :D

Geoff
 
There are many types of Inter process communications (IPC):

http://en.wikipedia.org/wiki/Inter-process_communication


All you need to do is build your own DLL and EXE (in C# i think), then make both to open a common type of IPC then just start sharing data....however if you meant "calling" the in-process function directly from outside external process...then thats another story...and i think is even complicated...its better to make a DLL and make it call the in-process function then share data to the external...and so on....thats is a "way" to do it...


Manuel
 
There are many types of Inter process communications (IPC):

http://en.wikipedia.org/wiki/Inter-process_communication


All you need to do is build your own DLL and EXE (in C# i think), then make both to open a common type of IPC then just start sharing data....however if you meant "calling" the in-process function directly from outside external process...then thats another story...and i think is even complicated...its better to make a DLL and make it call the in-process function then share data to the external...and so on....thats is a "way" to do it...


Manuel

Thanks Manuel

Yes, I was thinking that the 2nd in-process dll would be the easiest approach.

The question then is, what isthe easiest way to have the External managed code EXE, communicate with the 2nd in-process dll. ?

(Note: External managed code exe is on a different PC, to the two in-process dlls)

I am thinking SOCKET, as the my EXE is already communicating with another of my EXE's that is a socket server.
Then all I have to do is program a Socket Server into an in process Dll .. useful thing to be able to do !!


Ideally looking for some example code .. my C++ and Simconnect is not that advanced :confused:

Geoff
 
Last edited:
Ahh now i see....i was thinking that both EXE and DLL was actually running under the same PC, now i see its under a different PC, so yeah....a socket would be the best way to communicate both..HOWEVER!...depending in how many data you want to share...and if its a constant data...then you may consider reserving a client data area in simconnect:


http://msdn.microsoft.com/en-us/library/cc526983.aspx#SimConnect_CreateClientData


Make both EXE and DLL, to connect to a simconnect server (fsx), then make the DLL to create a Client Data section, of an X size of bytes, then make the EXE to join the same client data area, so then you have same thing as a socket..and also, you will save time coding socket routines, since Client data thing is a Simconnect's API...however if the data that you would like to make accessible between DLL and EXE would be "growing" as a dynamic list/array, then client data area isnt a good choice...all depends in what data and size and if its constant size in bytes, then Client Data area of SimConnect can be a good choice....


Manuel
 
Last edited:
Ahh now i see....i was thinking that both EXE and DLL was actually running under the same PC, now i see its under a different PC, so yeah....a socket would be the best way to communicate both..HOWEVER!...depending in how many data you want to share...and if its a constant data...then you may consider reserving a client data area in simconnect:


http://msdn.microsoft.com/en-us/library/cc526983.aspx#SimConnect_CreateClientData


Make both EXE and DLL, to connect to a simconnect server (fsx), then make the DLL to create a Client Data section, of an X size of bytes, then make the EXE to join the same client data area, so then you have same thing as a socket..and also, you will save time coding socket routines, since Client data thing is a Simconnect's API...however if the data that you would like to make accessible between DLL and EXE would be "growing" as a dynamic list/array, then client data area isnt a good choice...all depends in what data and size and if its constant size in bytes, then Client Data area of SimConnect can be a good choice....


Manuel

Thanks Manuel

Client Data area of Simconnect seems an ideal choice.

Data is of fixed size.

EXE passes 3 integers (parameters), and get an integer status returned.
So a small data area of 4 Int32's would cover it. :D

ie
int functionx(int A, int B, int C)

Geoff
 
Back
Top