C
Chris
Hi,
Currently, I have a console application written in C# and an unmanaged
legacy DLL written in VC++ 6.0. In the DLL's previous application, when an
event occurs in the DLL, a windows message would be sent to the host GUI
application via PostMessage to WM_USER + X. The GUI application would then
execute a function to retrieve data from the DLL.
With this new setup, I have a console application as the host. I retrieved
the handle for the console application using System.Runtime.InteropServices
and sent it to the DLL. When an event occurs, a windows message should be
sent to the console application from the DLL thus executing a function to
retrieve data from the DLL. Is this old method possible in .net or is there
a new and better way to do it? I haven't been able to figure it out. What
do I need to implement to receive the windows message in the console
application? Also, eventually, the console application will be converted to
a windows service. Will the windows message capture work in there as well?
Thanks for your time and insight,
Chris
Currently, I have a console application written in C# and an unmanaged
legacy DLL written in VC++ 6.0. In the DLL's previous application, when an
event occurs in the DLL, a windows message would be sent to the host GUI
application via PostMessage to WM_USER + X. The GUI application would then
execute a function to retrieve data from the DLL.
With this new setup, I have a console application as the host. I retrieved
the handle for the console application using System.Runtime.InteropServices
and sent it to the DLL. When an event occurs, a windows message should be
sent to the console application from the DLL thus executing a function to
retrieve data from the DLL. Is this old method possible in .net or is there
a new and better way to do it? I haven't been able to figure it out. What
do I need to implement to receive the windows message in the console
application? Also, eventually, the console application will be converted to
a windows service. Will the windows message capture work in there as well?
Thanks for your time and insight,
Chris