dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Error Loading DLL (urgent please)

  1. #1
    Join Date
    Jun 2002
    Posts
    24

    Error Loading DLL (urgent please)

    Error Loading DLL (urgent please)
    Hi,

    I have a win32 dll (dev in VC 6) and a client exe (dev in VB 6).

    I am calling a function myfunc() into dll from my client application. At the calling line I get error runtime error 48, file not found bent.dll (where bent.dll is the name of the dll myfunc() is exposed from)

    I have tried many combinations of putting client application and dll in one directory/system32 directory but invain.

    this was working until this morning when I terminate the (vc) debugger and modify some code in the function.

    Please see the code chunks and let me know if am missing something...thanks,

    code chunks...

    vb code:

    declaration:

    Public Declare Function myfunc Lib "bent.dll" (ByVal c As Long) As Long

    call: myfunc 2

    vc code:

    EXPORT int myfunc(long c);

    EXPORT int myfunc(long c)
    {
    return 1;
    }

  2. #2
    Join Date
    Sep 2000
    Posts
    77
    I guess bent.dll is not found in the directory from where your vb app is trying to load. You also need to supply the dependent dlls in the directory.

    Check where is this bent.dll is loading from, and also check whether all of it's dependent dlls are their places..


    There could be another possiblity as well.. check whether you are provding the correct version of dll and is dependencies..

    I suggest you rebuild all the files, make sure everything is in it's place and try once again..


    - kiran.

  3. #3
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    15
    I think pavankiran is right with his opinion, i know this error as well. To figure out witch dependencys your .DLL also have, you can use a tool named DEPENDENCY WALKER . This Tool shows you all .dll loaded from your dll. It also shows you what .dll canīt be found from your application, so you can search for it.
    Best regards
    Markus

  4. #4
    Join Date
    Jun 2002
    Posts
    24
    Thanks for your responses, I was able to correct it, version is very important here. I deletes all versions from several directories (kinda mess, I had) and started over again and made it. Although I took me more than a day...sometimes it takes

    -khushia

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)