Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Runtime error 48 calling C++ DLL from Access

Runtime error 48 calling C++ DLL from Access

Scheduled Pinned Locked Moved C / C++ / MFC
c++algorithmshelpquestion
4 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GaryDean
    wrote on last edited by
    #1

    Hello Everyone, This is my first attempt at doing anything with C++. I'm trying to create a C++ DLL using Visual C++ 2005 Express. The idea is to be able to call the functions in this DLL from an access application. After trawling for days, I now have a DLL that compiles and seems to work fine on the PC where it was developed. When I put my application on a different PC, I get a runtime error 48 when trying to load the DLL. The error text is 'File not Found' when searching for my DLL, but my investigation has show that this is actually a DLL loading error. After adding debugging code, I find that the LoadLibrary error is 0. I have tried rebuilding the DLL, rewriting it and receive the same error '48' every time whenever I try to run the DLL functions on other machines, despite everything being fine on the dev box. Does anyone have any ideas? Should I be shipping more than just the DLL to other machines? Thanks in advance. G :confused:

    H N 3 Replies Last reply
    0
    • G GaryDean

      Hello Everyone, This is my first attempt at doing anything with C++. I'm trying to create a C++ DLL using Visual C++ 2005 Express. The idea is to be able to call the functions in this DLL from an access application. After trawling for days, I now have a DLL that compiles and seems to work fine on the PC where it was developed. When I put my application on a different PC, I get a runtime error 48 when trying to load the DLL. The error text is 'File not Found' when searching for my DLL, but my investigation has show that this is actually a DLL loading error. After adding debugging code, I find that the LoadLibrary error is 0. I have tried rebuilding the DLL, rewriting it and receive the same error '48' every time whenever I try to run the DLL functions on other machines, despite everything being fine on the dev box. Does anyone have any ideas? Should I be shipping more than just the DLL to other machines? Thanks in advance. G :confused:

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Wheres your dll file(path) in current directory from your app or in windows directory

      _**


      **_

      WhiteSky


      1 Reply Last reply
      0
      • G GaryDean

        Hello Everyone, This is my first attempt at doing anything with C++. I'm trying to create a C++ DLL using Visual C++ 2005 Express. The idea is to be able to call the functions in this DLL from an access application. After trawling for days, I now have a DLL that compiles and seems to work fine on the PC where it was developed. When I put my application on a different PC, I get a runtime error 48 when trying to load the DLL. The error text is 'File not Found' when searching for my DLL, but my investigation has show that this is actually a DLL loading error. After adding debugging code, I find that the LoadLibrary error is 0. I have tried rebuilding the DLL, rewriting it and receive the same error '48' every time whenever I try to run the DLL functions on other machines, despite everything being fine on the dev box. Does anyone have any ideas? Should I be shipping more than just the DLL to other machines? Thanks in advance. G :confused:

        N Offline
        N Offline
        Neil Van Eps
        wrote on last edited by
        #3

        Where are you installing the DLL on the other machines? The DLL needs to be either in the same directory as the calling executable (Access in the case) or in the Windows path. Are you using a library in your DLL? (i.e. MFC) If so are you using static linking or dynamic linking? Any dynamically linked library needs its DLL to follow the same rules, in the same directory as the executable or in the windows path.

        1 Reply Last reply
        0
        • G GaryDean

          Hello Everyone, This is my first attempt at doing anything with C++. I'm trying to create a C++ DLL using Visual C++ 2005 Express. The idea is to be able to call the functions in this DLL from an access application. After trawling for days, I now have a DLL that compiles and seems to work fine on the PC where it was developed. When I put my application on a different PC, I get a runtime error 48 when trying to load the DLL. The error text is 'File not Found' when searching for my DLL, but my investigation has show that this is actually a DLL loading error. After adding debugging code, I find that the LoadLibrary error is 0. I have tried rebuilding the DLL, rewriting it and receive the same error '48' every time whenever I try to run the DLL functions on other machines, despite everything being fine on the dev box. Does anyone have any ideas? Should I be shipping more than just the DLL to other machines? Thanks in advance. G :confused:

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          And see MFC DLL Tutorial[^]

          _**


          **_

          WhiteSky


          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups