Solved

Win3.x can't find my DLL

Posted on 1997-08-13
7
192 Views
Last Modified: 2010-04-06
I have a Delphi 1.0 app that uses dlls that I wrote in MSVC++ v1.52c.

When the application is run under Win95 there are no problems, but under Win3.x I get an error message when it loads that says that the application or one of it's components can't be found.  The only components are the app, the dlls and the help file.

I've tried the declarations for the functions in the dll in the following two ways:

FUNCTION DTMaxCase( Q : PCHAR ) : LONGINT;  FAR; EXTERNAL
'QDT_DLPH.DLL';

FUNCTION DTMaxCase( Q : PCHAR ) : LONGINT;  FAR; EXTERNAL
C:\WINDOWS\QDT_DLPH.DLL';

I've tried it with the dll in the application directory, the windows directory and the windows system directory, with no success.

I've also compiled both the application and the dll under both Win95 and Win3.11.  Both give the same result.

Does anyone have any idea what might be causing this?  Do I have to declare the dll functions using an INDEX in Win3.x?


Thanks for any help offered,
Jody
0
Comment
Question by:jodyl
  • 4
  • 2
7 Comments
 
LVL 3

Expert Comment

by:mirek071497
Comment Utility
Try load dll manually (load Library etc.) because You don't know which dll was't found. Program's written in Delphi may need some dll other than You'r.
0
 
LVL 1

Expert Comment

by:peter_vc
Comment Utility
Run a TDUMP on your EXE and DLL's like so:
TDUMP myapp.exe >myapp.dmp

Load the dump into your favourite editor and search for "Module Reference Table".  Go through this section carefully and make sure that every DLL listed is available to the system.  Is your app using the BDE?  You'll have to make sure its installed under Win 3.1


0
 

Author Comment

by:jodyl
Comment Utility
I checked the output from running TDUMP on the exe and my dlls.  There are no other DLLs used except mine and they don't use any other DLLs.  

Also, the Win95 computers that it is running on would be less likely to have any other modules than the Win3.1 machines I've tried to run it on.  The Win3.1 machines have both Delphi and MSVC++ loaded on them.

I'm not using BDE.

0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 1

Expert Comment

by:peter_vc
Comment Utility
Hmm.  How many calls do you make out to the dlls?  If its fiesable, you might want to go through and create stub functions in your app to take over for the dlls JUST AS A TEST.  I'm not suggesting that you re-write your dlls into the app.  This way you can see if in fact it can't find a dll, or if its something else.  If your app runs without the dlls, add them back one by one to see which one is causing the problem.

0
 
LVL 1

Expert Comment

by:peter_vc
Comment Utility
I was just looking at some declarations in my Delphi code to access a dll and there is no ".dll" extention on them.  That seems too simple but you never know.


0
 
LVL 1

Accepted Solution

by:
peter_vc earned 200 total points
Comment Utility
Thats it!
I added .dll to my declarations.  Works fine in Win95, but Win 3.1 now says "Cannot find ..."

So just remove your .dll extentions from your declarations.  

Thanks MicroSoft.

0
 

Author Comment

by:jodyl
Comment Utility
Worked like a charm.

Thanks very much.

Jody

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now