Dalai

If windows program 1 sends

PostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)

to windows program 2,

can iParam point to data in program 1 so it can be read by program 2

if so, can anyone tell me how its done or perhaps suggest another solution

.



Re: Visual C++ Language Communication between two windows programs

crescens2k

Quite simply no, two programs have two seperate memory spaces so there is no way you can just refer to memory in one program and expect the other to read it. For this to work you have to send the data itself from one to the other.

You should look into interprocess communication, there are many options available too.






Re: Visual C++ Language Communication between two windows programs

Viorel.

Dalai wrote:

If windows program 1 sends

PostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)

to windows program 2,

can iParam point to data in program 1 so it can be read by program 2

if so, can anyone tell me how its done or perhaps suggest another solution

.

You can consider the WM_COPYDATA message too [http://msdn2.microsoft.com/en-us/library/ms649011.aspx], but the receiver will get a copy of data pointed by source pointer. This way you can send data which do not contain inner pointers to other objects.

I hope this makes sense.





Re: Visual C++ Language Communication between two windows programs

Dalai

thank you