From ec4e89dbf57538d9bdfc450dd681e7d86018e159 Mon Sep 17 00:00:00 2001 From: justin1014 Date: Fri, 13 Sep 2002 20:59:04 +0000 Subject: [PATCH] Changed SendMessage: WM_SETTEXT no longer implies string (hack), and lParam and wParam can pass strings if they begin with STR: git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1003 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/exec.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 243f7066..77b5c802 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -652,16 +652,21 @@ static int NSISCALL ExecuteEntry(entry *entries, int pos) int b3=process_string_fromtab_toint(parm3); int b4=process_string_fromtab_toint(parm4); - process_string_fromtab(buf,parm1); - process_string_fromtab(buf2,parm2); + if (which == EW_SENDMESSAGE) + { + process_string_fromtab(buf,parm3); + process_string_fromtab(buf2,parm4); + if (*(int*)buf == *(int*)"STR:") b3=(int)buf+4; + if (*(int*)buf2 == *(int*)"STR:") b4=(int)buf2+4; - if (myatoi(buf2)==WM_SETTEXT) { - process_string_fromtab(buf3,parm4); - b4=(int)buf3; + v=SendMessage((HWND)process_string_fromtab_toint(parm1),process_string_fromtab_toint(parm2),b3,b4); + } + else + { + process_string_fromtab(buf,parm1); + process_string_fromtab(buf2,parm2); + v=(int)FindWindowEx((HWND)b3,(HWND)b4,buf[0]?buf:NULL,buf2[0]?buf2:NULL); } - - if (which == EW_SENDMESSAGE) v=SendMessage((HWND)myatoi(buf),myatoi(buf2),b3,b4); - else v=(int)FindWindowEx((HWND)b3,(HWND)b4,buf[0]?buf:NULL,buf2[0]?buf2:NULL); if (parm0>=0) myitoa(g_usrvars[parm0],v);