I have been experimenting with sending messages from two .NET Windows Forms applications using WM_COPYDATA, and it works great.
I would like to know if that can be accomplished with console applications.
After all the SendMessage function takes in a window handle, how can I get the window handle of a console application?
[DllImport("User32.dll")]
public static extern Int32 SendMessage(int hWnd, int Msg, int wParam, [MarshalAs(UnmanagedType.LPStr)] string lParam);
Also do I need to set up some kind of message loop in the console application to be able to receive messages?