-
I reinstalled Visual C++ 4.0 on my old Pentium I 133 machine (under NT4.0-sp6). I tried to compile an old DLL that USED TO work perfectly when using it in my VB-app.
The file compiles well (no errors), links ok and the file is saved. I copy the DLL to my \winnt\system32 dir. But when I try to use it in my Visual Basic program, I suddenly get the following error message:
"Run-time error '453':
Can't find DLL entry point sum in myDLL.dll"
Source code of the DLL:
double __stdcall sum(double a, double b)
{
double DataValue;
DataValue = a + b;
return(DataValue);
}
Please note: I found an old DLL from the same source code, which I compiled and built about a year ago. When I copy that DLL to \winnt\system32 dir, everything works fine in my VB app.
So what could have gone wrong in the meantime???
Any help will be greatly appreciated!!
Sipke
-
Did the .DEF file get orphaned somewhere? For this it should look something like:
Code:
LIBRARY "myDLL.dll"
EXPORTS
sum
PS: You can shorten your code to:
Code:
double __stdcall sum(double a, double b) {
return (a + b);
}
-
You can also just take the name form Dependancy Walker, use that as the real name (alias), and just make up an easier name to use through out VB.