C++ DLL and C# interop
I have a c++ application who acts as a scheduler for other system
process. I also have a c# GUI that needs to be started by the c++
application. Simply callilng and running the c# .exe using the c++ app
isn't a problem, but communication between the two apps is.
I created a simple managed DLL as a test which contains "flag"
functions/methods so that both the c++ and c# apps could konw the state
of the other. i.e. if the c# GUI is closed the c++ app must be disposed
of as well. This was relatively painless and both apps can easily call
the exposed DLL's functions/methods, but in my silliness I neglected to
think about the fact that the DLL will be running in seperate memory
locations for each app so the DLL will not be a single persistent
instance hence no common data can be passed.
I have been reading up on how I can overcome this communication concern
and so far I have found the following:
1) Create and access shared memory for each app.( This application will
be utilizing vast amounts of shared memroy so this is a concern for my
2)Sending messages between the apps
3)Some sort of handshaking routine that I am as of yet unaware of.:P
Anyway, if anyone has any suggestions please feel free to post.
Thanks in advance!