Solved

Win3.x can't find my DLL

Posted on 1997-08-13
7
195 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
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
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…

770 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