|
|
#1 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
System::Call Locking up
This simple script locks up at the first DetailPrint 'Return: "$2"'. This occurs on my W2K machine at work, it works fine on my W2K and XP Pro machines at home.
The System::Call works, the correct path is displayed in the Title Bar of the window, but the window becomes unresponsive. No error message. If I comment out System::Call the script works, though it doesn't do anything. Script: SetPluginUnload alwaysoff OutFile 'C:\Downloads\NSIS\Plugin.exe' Section main InitPluginsDir SetOutPath "$PLUGINSDIR" File 'C:\Program Files\Palm\CondMgr.dll' ; copy dll there StrCpy $1 ${NSIS_MAX_STRLEN} ; assign memory to $0 System::Call 'CondMgr::CmGetCorePath(t, *i) i(.r0, r1r1).r2' DetailPrint 'Return: "$2"' DetailPrint 'Path: "$0"' ; last plugin call must not have /NOUNLOAD so NSIS will be able to delete ; the temporary DLL SetPluginUnload manual ; do nothing (but let the installer unload the System dll) System::Free 0 SectionEnd Any help appreciated. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Wouldn't you have to register the dll first with RegDLL?
-Stu |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
No, this isn't a COM dll.
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Well, I'm not sure how dll calls work in general, but how would the System plugin know where CondMgr is?
-Stu |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
SetOutPath "$PLUGINSDIR"
The system call succeeds, the correct path is displayed in the title bar of the installer window. The install hangs after that point though. |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Try the u option to unload the DLL after it's called. For example:
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
Thanks for the response, but no joy
. Tried the ?u with the same result.
|
|
|
|
|
|
#8 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
According to this page, CmGetCorePath expects a pointer to a buffer in the first parameter. You give it just a buffer. Try using *t instead of just t.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
Thanks for the suggestion. I've now tried both t which returns an empty string and *t which returns the correct path. In either case the install locks up after making the System::Call and tries DetailPrint. The t appears to be correct per the NSIS Help: t - text, string (LPCSTR, pointer to first character).
|
|
|
|
|
|
#10 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
t is not enough because the function expects a pointer to a pointer to the first char, not a pointer to the first char.
If it still hangs, it's time to get the debugger into action and find exactly where it hangs. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
I'm using HM NIS Edit, all I have found is the NSIS Help suggesting DetailPrint and MessageBox, DumpState and writing to a log file. Is there something better than these?
|
|
|
|
|
|
#12 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
I am not talking about a NSIS debugger. The script is fine, there is no need to debug it. It most probably hangs on the System::Free call. You need a debugger such as windbg to see what really happens deeper than the script.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Mar 2005
Posts: 7
|
Then I need debug symbols for System plugin and CondMgr. Do debug symbols exist for the System plugin?
|
|
|
|
|
|
#14 | |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
You'll have to compile the System plug-in yourself to get the symbols. The source code is available in Contrib\System\Source. If you don't have VC, you can compile it using the free Visual C++ Toolkit 2003:
Quote:
to the top of System.c.code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|