Archive: Need help for System::Call


Need help for System::Call
Hi !

A small preamble :
Yes I've read the rules, the doc, ....

But no I've got stuck. Even the minimalistic below doesn't work :

I'm writing a small dll:

#include <stdio.h>
void check (void)
{
FILE * t = fopen ("c:\test1.dat", "w");
}

Here is the nsis script to call that dll :

outFile "test_dll.exe"
Function loadDll
SetOutPath $TEMP\test_dll
File _license_dll\license_dll.dll
System::Call '$TEMP\test_dll\license_dll::check() '
FunctionEnd

section
Call LoadDLL
sectionEND

The test_dll.exe puts the dll in the right place, but then nothing happens. It doesn't matter which compiler is used (Visual C with its WINAPI or MinGW). I doesn't matter where I put the dll. It doesn't even matter when I call a dll or function that does not exist. Fiddling around with parameters only creates an return value "error". Calling a system dll works like a charm.

What is the point I didn't get ?

THX


You are probably not exporting the function undecorated, check with dependencywalker.com


Damned c(++) ;), too long ago that I worked with them.

Works,
THX