• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

Can't find my DLL when running in NT

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
nrosenblatt
Asked:
nrosenblatt
1 Solution
 
jorgen.hojdmoCommented:
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
 
jturpinCommented:
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
 
nrosenblattAuthor Commented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now