Solved

Win3.x can't find my DLL

Posted on 1997-08-13
7
200 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 3

Expert Comment

by:mirek071497
ID: 1341303
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
ID: 1341304
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
ID: 1341305
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:peter_vc
ID: 1341306
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
ID: 1341307
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
ID: 1341308
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
ID: 1341309
Worked like a charm.

Thanks very much.

Jody

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 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