Accessing 16bit DLL's in Delphi 2.0??

G'Day All,

I am using Delphi 2.0 (Developer) and Windoze 95

A simple one I am sure..... To access a DLL you call "LoadLibrary" and
then "LoadProcAddress" correct?? You use the THandle returned by
LoadLibrary to access the functions contained within the DLL.. (I have
a customised DLL, but have used the following Windoze DLL's as
examples.)

However this only seems to work for 32bit DLL's. The following code

procedure TForm1.Button1Click(Sender: TObject);
var
   DLL_Handle : THandle;
begin
DLL_Handle := LoadLibrary('Comdlg32.dll');
showmessage(IntToStr(DLL_Handle));
end;

returns a BIG number (obviusly) for the handle, however

procedure TForm1.Button1Click(Sender: TObject);
var
   DLL_Handle : THandle;
begin
DLL_Handle := LoadLibrary('Commdlg.dll');
showmessage(IntToStr(DLL_Handle));
end;

returns 0 which in the API means "System was out of memory, executable
file was corrupt, or relocations were invalid." So am I calling the
wrong API functions, or do I have to do something special to access a
16bit DLL.??

I appreciate the help. If possible could you mail me direct??

--Donovan

---------------------------------------------------------------------------
"If you're not busy being born then you are busy dying"  - Bob Dylan

E-Mail: infoafr...@dial.pipex.co.za    (Donovan J. Edye)

For the BIGGEST tourist information source on Southern Africa direct your
web browser to:

http://www.infoafrica.co.za
---------------------------------------------------------------------------