Results 1 to 3 of 3

Thread: DLL fails

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    4
    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

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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);
    }
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Guest
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width