Solved

Can't find my DLL when running in NT

Posted on 1997-08-05
3
197 Views
Last Modified: 2010-04-04
I've written an application that, in addition to the main EXE, also calls routines in a DLL that I wrote.  During execution, I store the DLL in the same folder as the EXE.  BTW, I also include the delphimm.dll to handle memory issues (the routines are functions that return values).

When I run the program under Win 95, there's no problem.  However, I've just installed the same application with the same folder structure on two different Win NT (4.0: one workstation, one server) systems and each complained that it couldn't find my home-grown DLL, even tho it was right there to be found.  I even moved copies of the DLL into the WINNT, WINNT\SYSTEM, and WINNT\SYSTEM32 folders, and still no go.

When I removed the delphimm.dll file, it complained about that before my own routine, and when I restored it, it went back to complain about not finding my DLL.

So, what do I need to do to make my program work under NT and find the DLL?

Thanx for any help.
0
Comment
Question by:nrosenblatt
3 Comments
 

Expert Comment

by:jorgen.hojdmo
ID: 1340650
How do you access the dll? Do you load it with the winAPI or do you use something like this?
procedure DoSomething; stdcall; external 'TheDLL.dll';

the latter works fine for me!


0
 
LVL 1

Accepted Solution

by:
jturpin earned 100 total points
ID: 1340651
I had a similar problem in WinNT. I fixed it by ensuring
the extension "DLL" was in my code like:
      procedure SomeRoutine; external 'MyDll.dll';

0
 

Author Comment

by:nrosenblatt
ID: 1340652
Yes, adding the ".DLL" to the name of the routine in the code did the trick.  While I'm tempted to wonder why this is, I'm more tempted to leave well enough alone and get on with life.

Thanx again.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

815 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

12 Experts available now in Live!

Get 1:1 Help Now