View Single Post
Old 13th January 2011, 21:04   #2
Anders's Avatar
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,451
2 is never going to work, this thing is not a NSIS plugin...

As to why 1 does not work is hard to say when you don't post the error message. But I'd say this "plugin" code is horrible and buggy, it leaks handles and the error string buffer.

To get the error string, you would have to treat $4 as a WCHAR* and extract it with the system::call struct syntax, then you will get a error string that may give some hints as to why it is failing, alternatively, do something like
PHP Code:
system::call 'user32::MessageBoxW(i0,i r4,i0,i0)i' 
After that you can pass $4 to LocalFree, but there is no way to close the two leaked handles, that needs to be fixed in the source

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote