From: happysegfault@yahoo.com (Happy Segfault)
Subject: Re: Minimal pragma Export (StdCall... example?
Date: 13 Mar 2004 17:01:37 -0800
Date: 2004-03-13T17:01:37-08:00 [thread overview]
Message-ID: <ed66a020.0403131701.6340dd59@posting.google.com> (raw)
In-Reply-To: 2de350pqsadlrvvgkrpc7261k31l5ejuap@4ax.com
Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote in message news:<2de350pqsadlrvvgkrpc7261k31l5ejuap@4ax.com>...
>
> The pragma Export gives you an opportunity to explicitly specify the
> name used in the DLL. So you can name your Pop_A_Window as
> "pop_a_window@0". You can also move it to Visual Basic side, where you
> can explicitly specify the link name:
>
> Declare Function Pop_A_Window Lib "my_Ada.dll" Alias "_pop_a_window"
> (...) As Long
>
> Probably you want to automate it and omit specifying any link name
> altogether. I doubt it that is possible.
>
> Though you can always buy GNAT Pro and try to convince ACT (GNAT
> vendor) to implement
>
> pragma Export/Import (VisualBasic, ...);
I took a look at glBegin() as an example Stdcall function. It appears in
Windows' OPENGL32.DLL as glBegin, not _glBegin or _glBegin@4, according to
objdump -p. It is pramga-Import'ed in win32-gl.ads in my GNAT distribution
with the command pragma Import (Stdcall, glBegin, "glBegin"); If I take a
look at the symbol table for the GNAT-supplied import library libopengl32.a,
using objdump -t, I find it listed as _glBegin@4 and not also as glBegin
or glBegin@4.
If I could replicate this with my own combination of a pragma Export (Stdcall,
... and the right gnatmake, gnatdll (or directly gnatlink, gnatbind, dlltool)
options, I think I'd have it. Unfortunately, I've got pop_a_window@0 in my
DLL (bad) and _pop_a_window@0 in my import library (good) at this point,
which messes up the import into Visual Basic. If I leave off the @0 in the
def file, I can get pop_a_window in the DLL (good) but then have
_pop_a_window in the import library (bad).
Any ideas, anyone?
Thanks for the reply! After checking out your homepage, I'm pretty sure
you're ten times the programmer I am!
John
next prev parent reply other threads:[~2004-03-14 1:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-11 13:31 Minimal pragma Export (StdCall... example? Happy Segfault
2004-03-11 14:03 ` Dmitry A. Kazakov
2004-03-12 12:50 ` Happy Segfault
2004-03-12 13:36 ` Dmitry A. Kazakov
2004-03-14 1:01 ` Happy Segfault [this message]
2004-03-16 13:54 ` Happy Segfault
2004-03-11 15:00 ` Frank
2004-03-12 13:02 ` Happy Segfault
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox