Solved

Problem with app that works only from within Delphi...(and Win 95)

Posted on 1997-03-26
5
157 Views
Last Modified: 2010-04-06
I have encountered a rather odd problem using Delphi 1.0.

I have an app with:

DBF files for the data
bunch of standard controls (dbedit, tlist, tgrid, etc.)
Formula1 and First Impression VBX's


Now, here's the strange part:

I make a few function calls to the Formula1 DLL which work just fine, thank you very much, under Windows 95 OR when run from within Delphi (under Win 3.1). When running under Windows 3.1 alone, the app will not run at all - Windows reports the generic message "Cannot find file (or one of its components)etc."

Now, if I comment out any function calls to this DLL, everything works again.

What's so damned confusing is the fact that the app will run under Win 95 and from within Delphi...also, to add to the confusion, the same app used to work fine under Windows 3.1 before a few minor changes were made (nothing of consequence - a few label changes...).

Every DLL and VBX the app could possibly want is available to it (in the app's directory, in C:\WINDOWS\SYSTEM and also elsewhere in the search path).

Does anybody have any idea what could be the problem here? I might be able to find a workaround (might) but it seems to me that this is a symptom of a potentially dangerous problem...

Thanx in advance,
0
Comment
Question by:reality
5 Comments
 

Expert Comment

by:jwk031597
ID: 1334999
Did you put the DLL's in win95's system dir and in win311's system dir?
0
 
LVL 4

Expert Comment

by:marko020397
ID: 1335000
Try to make a new project and disable optimizations.
0
 

Author Comment

by:reality
ID: 1335001
Edited text of question
0
 

Author Comment

by:reality
ID: 1335002
Adjusted points to 75
0
 

Accepted Solution

by:
twiddly earned 70 total points
ID: 1335003
I believe I ran into a similar problem about a year ago.  I too had an app that ran fine on Win95 (the development platform) but not on Win31 (the target platform).

Look at how you're declaring the external DLL's. If memory serves me right, you must NOT include the ".dll" in the declaration, just use the file prefix.  (It's possible I have this backwards, so if you AREN'T using ".dll" then DO use it.)  
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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