comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Translating a VB dll header to Ada
Date: Thu, 12 Apr 2007 10:06:44 +0200
Date: 2007-04-12T10:06:45+02:00	[thread overview]
Message-ID: <fdwh3w7tsg51$.cg9je6e42t2n.dlg@40tude.net> (raw)
In-Reply-To: 1176320910.543255.74730@b75g2000hsg.googlegroups.com

On 11 Apr 2007 12:48:30 -0700, vienapl@hotmail.com wrote:

> I'm a really unexperienced programmer who trying to call a dll from
> Ada code. It compiles properly, but after some function calls I get
> the following error: raised PROGRAM_ERROR :
> EXCEPTION_ACCESS_VIOLATION.
> 
> The VB code is the following:

I am not an expert in VB, but for what it is worth

1. Microsoft changes VB permanently, you should really mention the version
number of the Beast. (:-))

2. The VBs I dealt with didn't used C convention. In your sources I see

   pragma Import (C, ...);

This means a C convention (cdecl in Windows terms), but it should be
stdcall instead:

   pragma Import (stdcall, ...); -- If you are using GNAT

3. Passing strings from/to VB is a mess. I don't remember the details,
sorry. Maybe others could comment on that.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2007-04-12  8:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11 19:48 Translating a VB dll header to Ada vienapl
2007-04-12  8:06 ` Dmitry A. Kazakov [this message]
2007-04-12 14:17   ` vienapl
2007-04-12 17:16     ` Dmitry A. Kazakov
2007-04-13 15:25       ` vienapl
2007-04-13 16:55         ` Dmitry A. Kazakov
2007-04-14  1:05           ` vienapl
2007-04-14  7:17             ` Dmitry A. Kazakov
2007-04-14 12:16               ` vienapl
2007-04-14 14:01                 ` Philippe Bertin
2007-04-14 15:30                 ` Dmitry A. Kazakov
2007-04-14 21:37                   ` vienapl
2007-04-15 14:03                     ` vienapl
2007-04-15 15:32                       ` Dmitry A. Kazakov
2007-04-18 18:47                       ` Tarjei T. Jensen
2007-04-12 11:34 ` gautier_niouzes
2007-04-12 14:24   ` vienapl
replies disabled

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