PDA

View Full Version : Failed to call DLL function. (#2, Line 1)


fe4ther
01-13-2003, 10:40 PM
I need to call a function from a dll. But all I get is this eror

Failed to call DLL function. (#2, Line 1)
Could not find function.
I wrote that dll in VB6.0.
There is only one function and I am sure that I
use the right name to call it. The return value is String,
the same as I set in SF.
What could be wrong here?

Thanks.

Brett
01-14-2003, 09:12 AM
I would suspect that it is something to do with the way that VB names the functions for export. Do some research about making VB DLLs that can be called from C++. Since AMS40 uses C++ to call the DLL functions, that information may help you create more compliant DLLs.

fe4ther
01-14-2003, 08:04 PM
Do you thiks that if I used C++ it would work better?

Brett
01-14-2003, 08:28 PM
From my experience, yes C++ is the best language for writing DLLs. I made a tutorial that you can read here (http://www.icynorth.com/development/createdlltutorial.html) to get you going.

fe4ther
01-14-2003, 09:01 PM
Thanks, Brett. I will definetely read your tutorial, but I aleady have a dll written in c++ and I am getting the same error.
I use Call DLL Function statement accordingly to FO help, so
I am quite puzzled about the reason fon the error.