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

DLL file not found 1

Status
Not open for further replies.

gswetzel

Technical User
Mar 7, 2002
11
US
In my VB6 project I am referencing a dll which produces a 'file not found' error on a Windows 2000 machine. The same program runs fine on Win 95 & 98. I tried putting the dll in different folders, using the fully qualified path in the declaration, but still get the error. The error occurs when invoking a dll function.

I saw this same problem in the Delphi forum, with no solution posted, only suggestions which I've tried and don't work.

No help on Microsoft that I can find.

 
Have you registered the DLL with Windows?
If not, try running the command:

regsvr32 DLLName

As I understand it, if your DLL is in the SYSTEM (SYSTEM32 on 2K I guess), you don't need to supply the full path.. just the file name. If it's somewhere else, give regsvr32 the full path and file name.

I think that if you use some packaging software to create an installer for your program it will find dependancies such as DLLs, copy and register them for you.
 
Thanks, I've tried registering with regsvr32, but get message 'Load Library failed'. Another application uses this library successfully in Windows 2000.(but I don't know how or have source).

Greg
 
gswetzel,

What is the exact hex error code reported when regsvr32 fails?
 
What DLL are you having problems with. Certain DLL's also have dependancies that need to be present when you register the DLL. If the dependancies do not exist, the DLL registration will fail.

Chris Dukes
 
In order Regsvr32 to run correctly, You have to close VB because if this dll is needed for your VB project, the VB soft keeps a link to it that crashes Regsvr32. Water is not bad as soon as it stays out human body ;-)
 
I am having the same problem with EEHLLAPI.DLL.

I tried runing the regsvr, as someone suggested, but I get the error:

"eehllapi.dll" is not an executable file and no registration helper is registered for this file type.

What does this mean?
BTW, this DLL is only about 20K. Seems small to me.

Thanks.
Greg.
 
Who wrote the DLL? Is it actually a normal DLL or is it a ActiveX DLL. Normal DLLs do NOT need to be registered. They just need to be in the search path to be loaded. These DLL's are DLL's that just expose functions not actual whole objects.

If it is a ActiveX.DLL you also have the possibility that it requires other ActiveX.DLLs for normal operations. So even if you register it when you goto use it you may find that it will fail because it in turn tries to load another DLL.
 
Greg,

I think you will find EEHLLAPI.DLL not an activeX Dll. It is a standard 'C' dll which can only be referenced in VB using DECLARE statements.

As it is not an ActiveX dll it cannot be registered.

Hope this helps,

Chris Dukes
 
SemperFi is correct about not having to register non COM DLL's, which is my situation.

My problem began when I tried to use the same VB program and DLL in Windows 2000(from 95). Something in the install of Win 2000 changed the configuration, which caused the failure of the VB program, but I can't figure out what caused it. There are other 2000 machines on which this VB program runs fine. The path on those machines doesn't include the DLL folder. I can't ascertain the difference in the machine configurations, and thought someone may have encountered something similar.

Thanks in advance.

Greg

 
What is the dll - it's not anything to do with Crystal Reports is it?
 
DLL is pcshll32.dll, which is from IBM's PCOMM, a 3270, mainframe terminal emulation program for PC's.

Greg
 
Thanks, ngiz for link, but the solution suggested there is to have the dll in the default emulation folder. My dll is in the default emulation folder already.

gswetzel@pplweb.com
greg
 
I think you might find that the DLL you are having problems with is not the actual culprit. I have a feeling that the pcshll32.dll probably calls many other DLL which Win2K cannot find.

When invoking a function in a DLL, the DLL will try to load all the dependancies. It is when loading these dependancies that one of the required DLL's are missing.

If the DLL is a from something like IBM's PCOMM, a 3270, mainframe terminal emulation program, it probable requires a whole host of underlying communication / netwoking DLLs. These DLL's are usually 'C' Dlls and need to be either in a PATH variable or in the System32 directory so that windows is able to find and load the files.

You might also find that if the dependancies have been hard coded, then they must be in a certain directory.

DO Not confuse registering DLL's as these will not be activeX dll's that require registering.

Not only have you got all of the above, but you must also make sure that the versions of the files are the same. IBM have been known to change Ordinal values of their DLL function between versions.

Are you sure that the terminal emulation program actually runs on WIN2K. If it does not then you might need Win 2K versions of the DLL's.

Hope this helps,

Chris Dukes
 
Thanks Chris, very helpful. I have run depends.exe and found no errors in dependencies. However, your comment about versions of files may be the key. Do you mean all dll sublibraries must have the same version #? If so how do I find the version ?

I noticed from depends that some of the sublibraries are Windows files, located in the system32 folder and some are IBM libraries located in the default emulation folder. Could it be that this is causing a problem?

Greg
 
You will find that some of the dependancies are windows files and some are IBM as IBM libraries will need to use underlying windows API calls ( eg. Memory allocation etc.).

As far as versions are concerned, consider the following.

One IBM dll calls a function in another IBM DLL - StartProcess with a single variable (Char *UserName).

They decide to add a second variable (Char *Password) to the second DLL. The first DLL will nolonger work as it still only passes 1 parameter.

therefore both DLL's must either -

Pass and expect 1 parameter.
OR
Pass and expect 2 parameter.

Any other combinations of the two DLL's will fail.

This also happens with windows DLL's although they don't tend to change very often.

NOTE. The DLL's might not be the same numbered version
ie. DLL 1 might be version 1.2 which only works with Version 5.6 of DLL 2.

The best way I think to tackle your problem is to get a newly built win2K machine. Install your IBM's PCOMM 3270, mainframe terminal emulation program and get the program working in win2K. Check where and what DLL's have been installed with the mainframe terminal emulation program and then use these as the basis of your applications installation.

If Another application uses this library successfully in Windows 2000 as you mentioned before, Check what directory the other application is running in and check the PATH variables.

Windows looks for DLL's as follows:

System32 Directory
Current Running Directory
Any direcory in the PATH variable

If the DLL does not exist in any of these places, it will fail to load.

Chris Dukes

 
Problem: I get a File Not Found Error Message.

Solution: RPG-Alive makes use of the HLLAPI DLL provided with your emulation software. RPG-Alive first looks in your Autoexec.bat PATH folders to locate the required DLL. If this attempt fails, it tries to look for the DLL in the default emulation folder.

Emulation
HLLAPI DLL File Name
Default Folder

Client Access
PCSHLL32.DLL
C:\Program Files\IBM\Client Access\Emulator\

NetManage RUMBA
ehlapi32.dll
C:\Program Files\WallData\SYSTEM\

WRQ Reflection
HLLAPI32.DLL
C:\Program Files\Reflection\

Synapse IP Client
Whllapi.dll
C:\IPCLIENT\

BOSaNOVA
Bshll32.dll
C:\Program Files\BOS\BOSaNOVA TCP-IP\

A 'File Not Found' Error Message is generated if neither attempt successfully locates the needed DLL.

If your HLLAPI DLL file is not in the default folder as shown above, you should find the appropriate file on your PC, and then enter the File's Folder Path when asked for it by RPG-Alive.

 
Thanks again Chris. PCOMM is running OK on this machine. No other VB apps using this DLL will run. However, the same VB apps will run on a different Win 2000 machine(also with PCOMM). Do you think PCOMM itself uses all of the same DLL's and that if it runs the DLL's used by VB are OK?

Greg
 
Know you know why they call it DLL hell and I thought it was supposed to go away with Win2K !!!

try Checking the PATH variables on the two machines.

I am sure PCOMM will use the same DLL's as your VB application so it sound as though when VB runs, it can't find them, but when PCOMM runs it can.

Are the DLL's in the same diectory as PCOMM. If so, Is this in the PATH variable on each machine.

Chris Dukes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top