Solved

Win3.x can't find my DLL

Posted on 1997-08-13
7
203 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
Industry Leaders: 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

Technology Partners: 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!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

696 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