Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   System.dll access violoation (http://forums.winamp.com/showthread.php?t=239492)

jefuree 28th February 2006 15:02

System.dll access violoation
 
Hello!

After searching and trying the solutions if found here in the forum I still have the same problem.

I'm trying to call a dll file but everytime I try to call this dll I get an access violation.

The dll is copied into the temp folder

SetPluginUnload alwaysoff
# change dir to temp folder
SetOutPath $TEMP\AFTNStation
# call setupsupport dll
System::Call "setupsupport:NullSoftEntry(i 5)i .r0"
MessageBox MB_OK "result $0"
SetPluginUnload manual

Right now the dll looks like this:
LONG NullSoftEntry(LONG routineID)
{
return 0;
}

Anyone to help ?

Thx in advance,
Jens

Takhir 28th February 2006 16:04

DLL procedure should have something like extern "C" (for cpp files) __stdcall __declspec(dllexport), i.e. PASCAL convention (may be not important for single param) and entry point should be visible (in the dependency walker, for example).

kichik 28th February 2006 17:55

It's very important, if the function accepts any parameters. If the wrong calling convention is used, the stack will get corrupted and the installer will probably crash.

jefuree 1st March 2006 07:20

Hello Everybody,

thanks for your reply.
I found the error.

There was an error in the call statment I used only one colon instead of the necessary two :igor:

So instead of System::Call "setupsupport:NullSoftEntry()"
the right call was
System::Call "setupsupport::NullSoftEntry()"

Regards Jens


All times are GMT. The time now is 04:56.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.