From: "Alexandre E. Kopilovitch" <aek@vib.usr.pu.ru>
To: comp.lang.ada@ada.eu.org
Subject: Re: GNAT and a very foreign DLL
Date: Sun, 6 Jan 2002 03:31:15 +0300 (MSK)
Date: 2002-01-06T03:31:15+03:00 [thread overview]
Message-ID: <mailman.1010276762.30835.comp.lang.ada@ada.eu.org> (raw)
Ted Dennison<dennison@telepath.com> wrote:
>> The problem appears to be with the combination of the call convention and
>>the names of the DLL's entry points: the call convention is surely Stdcall,
>>but the entry point names do not contain usual suffixes "@nn" - they look as
>>common C identifiers.
>..
>> As the Stdcall convention is unavoidable anyway, I was forced to create some
>>"post-linker", which post-processes my executable, replacing "@" in the DLL's
>>entry point names by zero bytes. After that post-processing all works fine,
>
>If the problem is just the name, why don't you just use the "Link_Name"
>parameter to "pragm Import" to specify the name they actually used?
Because with that Link_Name the suffix "@nn" is still appended. As the GNAT
User's Guide honestly says (at the end of Microsoft Windows Topics/Windows
Calling Conventions/Stdcall Calling Convention section):
"... there is no trailing underscore but the appropriate @nn is always added
at the end of the Link_Name by the compiler. "
>However, you may want to check the C header files for that routine to make sure
>the calling convention is what you think it is. I have seen DLL's with routines
>with different conventions in them before.
I checked that, and there are the Stdcall directives indeed. And moreover, all
that stuff works properly with the Stdcall calls.
Alexander Kopilovitch aek@vib.usr.pu.ru
Saint-Petersburg
Russia
next reply other threads:[~2002-01-06 0:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-06 0:31 Alexandre E. Kopilovitch [this message]
2002-01-07 16:19 ` GNAT and a very foreign DLL Ted Dennison
2002-01-08 15:48 ` GNAT and NT DLL; An Ada-Comment resignation Vim Pine 44
2002-01-09 10:20 ` Pascal Obry
2002-01-09 17:59 ` Craig Carey
2002-01-10 2:10 ` Robert Dewar
2002-01-12 18:01 ` Craig Carey
-- strict thread matches above, loose matches on Subject: below --
2002-01-04 22:04 GNAT and a very foreign DLL Alexandre E. Kopilovitch
2002-01-04 22:20 ` Ted Dennison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox