Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a C++ DLL for use with Access - Runtime error 48

Status
Not open for further replies.

GaryDean

Programmer
Jul 31, 2006
2
GB
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
 
If your DLL uses other DLLs that come with Visual Studio, you'll need those ones too. Use the Depends tool to see what other DLLs your DLL depends on.
 
Thanks cpjust. I have run depends.exe and found that I had a dependency on msvcr80.dll. It was on my PC but not the failing machine..... However, I copied it over (to C:\windows\system32 and the same directory as my own DLL for good measure, but the error persisted.

In the meantime, I got a friend to compile my DLL from the source and this has worked fine! My compiled file was 7k and theirs was 40k.

Any idea what I am doing wrong when I compile my DLL? I am using Visual C++ 2005 Express, whereas they are on a full version.

Thanks Again,

G
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top