From: happysegfault@yahoo.com (Happy Segfault)
Subject: Re: Minimal pragma Export (StdCall... example?
Date: 12 Mar 2004 05:02:29 -0800
Date: 2004-03-12T05:02:29-08:00 [thread overview]
Message-ID: <ed66a020.0403120502.40e08380@posting.google.com> (raw)
In-Reply-To: 40507f55$1@news.wineasy.se
"Frank" <franjoe@frisurf.no> wrote in message news:<40507f55$1@news.wineasy.se>...
> Hi!
>
> Some weeks ago I had difficulties with the same and managed to compile/link
> when I wrote the spec according to the following pattern,
> when I worked with a DLL written in Delphi Pascal :
>
> pragma Import (Stdcall, UpdateAll, External_Name => "UpdateAll",
> Link_Name => "_UpdateAll");
>
>
> Unfortunately I havent tested the resulting executable since I do not have
> the necessary HW to do it, but it compiled.
> You could give it a try.
>
> Frank
I've found that Visual Basic can successfully call functions in the DLL.
By using objdump to check the symbol table, the (I think) properly decorated
function name is there: _pop_a_window@0. A call to "pop_a_window" in VB
works just fine.
I don't think the DLL itself is a problem---it has the right function names.
There are two other parts, and neither one seems to do what I expect. The
link library that gnatdll produces has only _pop_a_window (leaves off the
@0), and the pragma Import (Stdcall, Pop_A_Window, "pop_a_window") in
the test app causes the linker to look for pop_a_window@0 in the link
library. Both should be _pop_a_window@0 if they're really StdCall, right?
I've tried several combinations of linker options on gnatdll, but I
wasn't able to get it to export _pop_a_window@0 in the link library. I was
hoping someone had a minimal working example of Stdcall export and import
(especially the makefile). Anybody?
Thanks for the tip!
John
prev parent reply other threads:[~2004-03-12 13:02 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
2004-03-16 13:54 ` Happy Segfault
2004-03-11 15:00 ` Frank
2004-03-12 13:02 ` Happy Segfault [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