Board index » delphi » LoadLibrary works wunder NT but not win95

LoadLibrary works wunder NT but not win95

I have written a DLL in C with all the correct calling convention notation
which I need to call from a delphi app.

hInst :=LoadLibrary('MyDLL.Dll');

hInst = 0 under windows 95 but it all works tickety-boo running the same code
under NT.

Does anyone have any ideas why this happens?

adam

---------------------------------------------------------------
Adam Straughan
Software Engineer
MDSI UK Ltd
http://www.advantex-mdsi.com
---------------------------------------------------------------

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

 

Re:LoadLibrary works wunder NT but not win95


lobster_altavi...@my-dejanews.com schrieb:

Quote

> I have written a DLL in C with all the correct calling convention notation
> which I need to call from a delphi app.

> hInst :=LoadLibrary('MyDLL.Dll');

> hInst = 0 under windows 95 but it all works tickety-boo running the same code
> under NT.

> Does anyone have any ideas why this happens?

It has to do with the filename - one of the OS' needs the ".dll", the
other doesn't (can't remember which one is which - must try...)

Matthias
--
___________________________________________________________
le...@codelab.ch             42              Matthias Leisi

  All SPAM sent to this address is reported and posted

Re:LoadLibrary works wunder NT but not win95


well had a similair problem, a self made DLL would not load like that until
I figured out that my own DLL used another DLL, this worked fine as long as
both DLL's where in the same folder or the 2nd DLL was in the system or
windows folder

maybe under your NT version this is the case and not under 95 ?

Alex

--
remove .nospam if you reply by e-mail
--
The Motherboard Monitor:
http://www.euronet.nl/users/darkside/mbmonitor/
--

Quote
lobster_altavi...@my-dejanews.com wrote in message

<6ttvi8$uv...@nnrp1.dejanews.com>...
Quote
>I have written a DLL in C with all the correct calling convention notation
>which I need to call from a delphi app.

>hInst :=LoadLibrary('MyDLL.Dll');

>hInst = 0 under windows 95 but it all works tickety-boo running the same
code
>under NT.

>Does anyone have any ideas why this happens?

>adam

>---------------------------------------------------------------
>Adam Straughan
>Software Engineer
>MDSI UK Ltd
>http://www.advantex-mdsi.com
>---------------------------------------------------------------

>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

Re:LoadLibrary works wunder NT but not win95


Quote
On Fri, 18 Sep 1998 18:18:05 +0200, Matthias Leisi <le...@codelab.ch> wrote:
>lobster_altavi...@my-dejanews.com schrieb:

>> I have written a DLL in C with all the correct calling convention notation
>> which I need to call from a delphi app.

>> hInst :=LoadLibrary('MyDLL.Dll');

>> hInst = 0 under windows 95 but it all works tickety-boo running the same code
>> under NT.

>> Does anyone have any ideas why this happens?

>It has to do with the filename - one of the OS' needs the ".dll", the
>other doesn't (can't remember which one is which - must try...)

>Matthias
>--
>___________________________________________________________
>le...@codelab.ch             42              Matthias Leisi

>  All SPAM sent to this address is reported and posted

NT is the fussy one. I also declare the external calls in CAPITALS.

HTH.

Other Threads