From: ImageAnalyst on 5 Jan 2010 16:16 My VB6 app uses a custom written dll. The app runs (launches) fine but when it comes time to call the function in the DLL it throws an error "File not found: pgOverlay.dll" I've put that DLL in the app's folder (where the source code, the exe, and all the rest of the project files are), in the \Windows\system32 folder, in the \Windows\system folder, and in the \Windows folder. It didn't matter where I put it, it wasn't found in any of those places. Here's how it's declared in the vb bas module: Declare Function pgovlCreateOverlayFile Lib "pgOverlay.dll" (ByVal sFilename As String) As Long Also, just to make sure that the function is in the DLL with the right name and arguments, I checked it with Dependency Walker and the function is in the DLL and I'm calling it correctly. (Besides the error was about the DLL file not being found, not about some kind of calling/argument error.) Note there's no path hard coded into the declaration. I'm using Windows Xp. Any idea why it's not finding it in the folders that it's supposed to be looking in? Where the heck is it searching for it?
From: Ralph on 5 Jan 2010 17:14 ImageAnalyst wrote: > My VB6 app uses a custom written dll. The app runs (launches) fine > but when it comes time to call the function in the DLL it throws an > error "File not found: pgOverlay.dll" > > > Any idea why it's not finding it in the folders that it's supposed to > be looking in? > Where the heck is it searching for it? In the case where you have checked the obvious, then it is likely it is not "pgOverlay.dll" that the Windows Loader can't find, but rather some component pgOverlay is dependent on that can't be found. -ralph
From: ImageAnalyst on 6 Jan 2010 12:59 But wouldn't this be revealed by dependency walker? It showed nothing missing.
From: Ralph on 6 Jan 2010 15:04 ImageAnalyst wrote: > But wouldn't this be revealed by dependency walker? It showed nothing > missing. Yes, usually. Occasionally, runtimes don't show up in Dependancy Walker. What language / development tool was the Dll written in? We are talking about a 'standard' DLL here, correct? If it is an ActiveX Dll then it has to be registered, and accessed by early binding or automation, ie, you don't use the Declare functions. -ralph
From: ImageAnalyst on 7 Jan 2010 09:59 ralph: I did manage to find the source code (it's not mine - I didn't write it). It's written in C++. It does call some ActiveX DLL's from a third party package, which I have and which are registered. When I try to register this pgOverlay.dll, it says "pgOverlay.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered." As I understand it, not all DLL's NEED to be registered, although some can be (though I'm not sure why this is unless it's just to find things that aren't anywhere in the search order). I'm going to try to hard code the path to this DLL in the ...\Release folder and see if that works, just as a test to see if it runs - I don't want to leave the path hard coded in there permanently. I'll post back....
|
Next
|
Last
Pages: 1 2 Prev: Passing object across processes Next: VB(A) library of Bessel functions |