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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLL Not Found - Runtime Error 53 1

Status
Not open for further replies.

gharabed

Programmer
Sep 7, 2001
251
US
When I run a VB app I wrote I receive a runtime error that it cannot find a particular DLL (this is a third party DLL that is used to interface with a piece of hardware). I've included the VB modules that reference the DLL and everything compiles fun but when I run the program I get the runtime error 53) that this DLL (ag875x_32.dll) cannot be found. I searched for the DLL and it is actually in the folder with the .bas modules I included. Why can't it find the DLL?

Greg
 
From you description I am presuming that the DLL is a 'C' Dll that you call from VB using Declare statements.

VB/windows will try searching for the DLL in several Places-

The Windows/System32 directory.
Paths in the PATH environment variable.
The directory the application is currently running in.

I suggest you copy the DLL to the windows system directory and try again.

Hope this helps,

Chris Dukes
 
Try to copy the dll file to the System(32) directory and then run the regsvr32 to make sure the dll is registered with the OS. Anything is possible, the problem is I only have one lifetime.
 
Foada,

You can only register a dll using Regsvr32 if the Dll is an activeX dll that contains objects. The running of regsvr32 registers the objects so that they can be created at runtime.

In the above problem I think (hence the initial comments) that the DLL is a 'C' dll which requires DECLARE statements as with the WINAPI. In this case using Regsvr32 will do no good at all.

Chris Dukes
 
Thanks Chris,
You are very much correct. You know what they say, assumption is the mother of all #$*@ ups! Anything is possible, the problem is I only have one lifetime.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top