Need help for System::Call

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • binturong
    Junior Member
    • Aug 2012
    • 2

    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
  • Anders
    Moderator
    • Jun 2002
    • 5630

    #2
    You are probably not exporting the function undecorated, check with dependencywalker.com
    IntOp $PostCount $PostCount + 1

    Comment

    • binturong
      Junior Member
      • Aug 2012
      • 2

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

      Works,
      THX

      Comment

      Working...
      X