madshi wrote:For changing the window caption usually SendMessage(WM_SETTEXT) works just fine. Not sure if it also works for console windows, though.
Not sure what you want to know about IProcess.ExecuteFunction and IModule.GetProcAddress exactly?
Console windows do not have a message handler windows.
and SendMessage does not always work.
Determine the console application window so as impossible as they all have a class ConsoleWindowClass.
At the moment I'm using just such a scheme:
AppInfo.WindowHande: = GetConsoleWindow;
ShowWindow (AppInfo.WindowHande, SW_HIDE);
And it works, but again not always.
So I came up with another option. Load a DLL into the address space of another process also control the process through this DLL.
Program TrayIt, exactly what works! DLL is the Windows message handler and react like a normal gui application.
The problem is that I don `t know how to call a function from the loaded DLL in the address space of another process, and pass it a parameter.
Or how to run my code in the address space of another process. Examples are described in the certificate are not entirely clear to me ...
Could you give some examples to meet the following of my code in the address space of another process? Or with a call to the DLL is loaded into the address space of another process ....