comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <martin@krischik.com>
Subject: Re: DLLs with GNAT?
Date: Fri, 14 Jan 2005 17:51:00 +0100
Date: 2005-01-14T17:51:00+01:00	[thread overview]
Message-ID: <1875595.ZbNz8ekifv@linux1.krischik.com> (raw)
In-Reply-To: 41E7F265.18334E9E@alfred-hilscher.de

Alfred Hilscher wrote:

>   function DLLMain (hInstDLL : Win32.Winnt.HANDLE;
>                     dwReason : Win32.DWORD;
>                     lpvReserved : Win32.LPVOID) return Win32.BOOL;
> private
>   pragma Export (C, Init_API);
>   pragma Export (C, Finish_API);
>   pragma Export (C, Factorial);
>   pragma Export (C, DllMain);
> end API;

Having seen your source I can give you a more excact URL:

http://cvs.sourceforge.net/viewcvs.py/adacl/CUnicode/Include/NT/ada_dll.ads?view=markup

look for the pragma export of DllMain!

And for good friends of yours advocating C language: if you acidently used
__cdecl on DllMain it would not have worked in C either. Or if __cdecl is
default and you forget to use __stdcall. And of corse, same if you forget
to use either export "C" or __stdcall when using C++.

A little mistake which can happen to anybody in any programming language.

With Regards

Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com



      reply	other threads:[~2005-01-14 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-09 14:57 DLLs with GNAT? Alfred Hilscher
2005-01-12 21:51 ` Bernd Specht
2005-01-13  0:20   ` Jeff C
2005-01-14  8:57 ` Martin Krischik
2005-01-14 16:25   ` Alfred Hilscher
2005-01-14 16:51     ` Martin Krischik [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox