Archive: System.dll access violoation


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


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).


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.


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