|
|
#1 |
|
Junior Member
Join Date: May 2006
Posts: 17
|
Problem with System::Call
Hi all...
I'm having a problem with System::Call that in some machines works ok but in other computer's it fails the call returning 'error'. Is there some kind of requisite for using this function? The code looks like this: code: Now I've tested this on a cleaned machine installed with the first version of Windows XP and though I set a correct serial number there is no validation (the value in $1 is always 'error'), then I gradually updated it, when finally installed Service Pack 2 the serial validation occured correctly. Does the System::Call function need the Service Pack 2 installation (does it use some funcion that was only available through the SP2)? or am I missing something in my code. If there's the need to install SP2 could there be another way of calling an external DLL function? Thanks for your time, best regards, Samuel Moura |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
System::Call doesn't need SP2, but your validation DLL might. Check out its dependencies using Dependency Walker. Ideally, you should compile your DLL with static linking, so it won't depend on anything like msvcr71.dll or any other DLLs.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: May 2006
Posts: 17
|
Quote:
Thanks very much!
|
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: May 2006
Posts: 17
|
Hum... I've been cleaning my dll though I cant seem to put it to work in a computer without SP2!
I've used the Dependency walker to check the dependencies and my dll only depends on Kernel32 + NTdll (consequently). The only functions I use beside the standard string functions are malloc, free and memset wich were already available before SP2. Any help would be kindly appreciated! |
|
|
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Are malloc, free and memset statically linked or dynamically linked to msvcr71.dll?
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#6 | |
|
Junior Member
Join Date: May 2006
Posts: 17
|
Quote:
|
|
|
|
|
|
|
#7 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Well, if you said you only see kernel32.dll in Dependency Walker, it's probably statically linked or else you'd have seen msvcr71.dll. Can you attach the DLL?
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#8 | |
|
Junior Member
Join Date: May 2006
Posts: 17
|
Quote:
|
|
|
|
|
|
|
#9 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
I can't see any used import that shouldn't exist on all versions of Windows XP. However, there are many imports that aren't available in Windows 9x. Namely, all of the Unicode enabled functions like LCMapStringW and GetEnvironmentStringsW.
Back to the point, run depends.exe on the file on Windows XP SP 0. It should paint imports it can't find in red. Also, which System.dll are you using? You didn't recompile NSIS, right? NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#10 | |
|
Junior Member
Join Date: May 2006
Posts: 17
|
Quote:
I'm using the one that comes with NSIS 2.21, installed it today, and no recompilation !
|
|
|
|
|
|
|
#11 |
|
Junior Member
Join Date: May 2006
Posts: 17
|
:P meanwhile solved the problem
it seems that in systems prior to SP2 there's a need to specify the output directory to the plugins directory before using the plugin! code: Added the first line of this snippet and changed the second one! It now works! Thanks very much for your time!
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|