billym
8th April 2006 22:05 UTC
Using SendMessage help?
I need my nsis installer to send custom windows messages to the application that is listening for the stages of the installation. I believe that I need to use sendmessage with WM_COPYDATA but do not know how to do it within nsis. Any help would be appreciated.
Joel
9th April 2006 00:49 UTC
WM_COPYDATA? Then you'll need system plugin to send the COPYDATASTRUCT to the application. See sytem plugin help file about how to use structs.
billym
9th April 2006 18:49 UTC
I had looked at the system wiki/examples but did not understand how to implement.
{_trueparuex^}
10th April 2006 11:24 UTC
System plugin is not necessarily needed here. Try something like this.
!define WM_COPYDATA 0x004A
FindWindow $0 "my window class" "my window title"
FindWindow $1 "#32770" "" $HWNDPARENT
SendMessage $0 ${WM_COPYDATA} $1 $data
But this will work only if lisner application haves a window.
Edit: I tried it myself and it didn't work. :(
Joel
10th April 2006 14:32 UTC
Hi {_trueparuex^} :)
Of course we need system plugin to use COPYDATASTRUCT, see msdn's about WM_COPYDATA
I'll try to write an example about it.