From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: Using windows API functions
Date: 1998/07/10
Date: 1998-07-10T00:00:00+00:00 [thread overview]
Message-ID: <uk95ll1nj.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 6o569h$p78$1@cnn.Princeton.EDU
mcc@tyrolia.cs.princeton.edu (Martin C. Carlisle) writes:
> In article <900065152.385075@dedale.pandemonium.fr>,
> Antoine JORGE RIBEIRO <softst1@bruker.fr> wrote:
> >hi!
> >I desesperatly try to manage with the function ReadFile from Win32.Winbase,
> >in object ada (Aonix) and I don't understand How to use it and How the
> >lpBuffer : Win32.lpVoid might be used.
> >what's lpVoid, How can I Point to an array of Byte (mod 2**8).
>
> Win32Ada binds to C, where one can go from (void *) to (char *) at the
> drop of a hat. In Ada, I'd suggest an Unchecked_Conversion from
> your pointer type to Win32.lpvoid.
>
Actually, if you read the Win32Ada source code (always a good idea!),
you will find that Win32.lpvoid is just a renaming of System.Address.
Thus to find lpvoid for a buffer:
Data : my_data_type;
use 'address:
ReadFile
(lpBuffer => Data'address,
...
);
Have fun!
-- Stephe
prev parent reply other threads:[~1998-07-10 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-10 0:00 Using windows API functions Antoine JORGE RIBEIRO
1998-07-10 0:00 ` Martin C. Carlisle
1998-07-10 0:00 ` Stephen Leake [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