Board index » delphi » NT 4.0 - DLLs not referenced as DLLs?

NT 4.0 - DLLs not referenced as DLLs?

I wrote a little program which called the ShellExecute command to bring up a
WWW page.  Works great at home on my Win95 box.  Brought it to work, tried to
run it on Win NT 4.0 (release version) and it said that it couldn't find
SHELL32 .  Not SHELL32.DLL, just SHELL32 .  SO, I copied SHELL32.DLL to SHELL32
and the program ran fine and worked just like it had on Win95.

What gives?  Is this a Delphi problem, an NT problem or my problem?  This is
Delphi 2.0 .  

Thanks for any thoughts.  Email is preferred.

Mike Strock
mstr...@eskimo.com
http://www.eskimo.com/~mstrock

 

Re:NT 4.0 - DLLs not referenced as DLLs?


Quote
Mike Strock (@Home) wrote:

> I wrote a little program which called the ShellExecute command to bring up a
> WWW page.  Works great at home on my Win95 box.  Brought it to work, tried to
> run it on Win NT 4.0 (release version) and it said that it couldn't find
> SHELL32 .  Not SHELL32.DLL, just SHELL32 .  SO, I copied SHELL32.DLL to SHELL32
> and the program ran fine and worked just like it had on Win95.

This is because the DLLs are imported without the .DLL extension in the
VCL units. I had this problem myself when I needed to call functions in
MSACM32 until I imported the functions from MSACM32.DLL instead of
MSACM32. I don't know of a better solution for this (except load
SHELL32.DLL yourself with LoadLibrary and call ShellExecute via
GetProcAddress).

Thanks, cheers,
+-----------------------------+------------------------------------+
| Adrian Cable [Doom Master!] | Internet: [MeGALiTH on IRC]        |
| Fidonet: 2:252/169.3        | aca...@sv.span.com                 |
+-----------------------------+------------------------------------+
| Latest ViRC '96 release: 0.61                                    |
| Get it from: http://apollo3.com/~acable/virc.html                |
+------------------------------------------------------------------+

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3i

mQBNAzICpWsAAAECAKELh2Zi1a+jD1Nj7VYloLg+uVimsRZHv5DgfCDOOo0nnXNq
KE19vjB1ZD4Rs1NTP8cQEjsnTwrHajgcZK8ecUkABRG0IUFkcmlhbiBDYWJsZSA8
YWNhYmxlQHN2LnNwYW4uY29tPokAVQMFEDICpWtqOBxkrx5xSQEBYjkB/jEcpWFp
y4t6XKL/zj34hfyCZYJKXQpuJlMWklywhu5OC2Z6WlsKeS6deKTyrW0GWw9hw6gS
qPdw+TcN9PSQBbE=
=6ioa
-----END PGP PUBLIC KEY BLOCK-----

Re:NT 4.0 - DLLs not referenced as DLLs?


Just change all exported functions declarations to something like

Function SomeFunction; external 'dll_name.dll';

instead of

Function SomeFunction; external 'DLL_NAME';

it works both in Win95 and NT 3.5 and 4.0.

In article <DyCGx5....@eskimo.com>,
   mstr...@eskimo.com (Mike Strock (@Home)) wrote:

Quote

>I wrote a little program which called the ShellExecute command to bring up a
>WWW page.  Works great at home on my Win95 box.  Brought it to work, tried to
>run it on Win NT 4.0 (release version) and it said that it couldn't find
>SHELL32 .  Not SHELL32.DLL, just SHELL32 .  SO, I copied SHELL32.DLL to SHELL32
>and the program ran fine and worked just like it had on Win95.

>What gives?  Is this a Delphi problem, an NT problem or my problem?  This is
>Delphi 2.0 .  

>Thanks for any thoughts.  Email is preferred.

>Mike Strock
>mstr...@eskimo.com
>http://www.eskimo.com/~mstrock

Other Threads