* Using windows API functions
@ 1998-07-10 0:00 Antoine JORGE RIBEIRO
1998-07-10 0:00 ` Martin C. Carlisle
0 siblings, 1 reply; 3+ messages in thread
From: Antoine JORGE RIBEIRO @ 1998-07-10 0:00 UTC (permalink / raw)
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).
Function is as described :
function ReadFile ( hFile :
Win32.winnt.HANDLE;
lpBuffer
: Win32.lpVoid;
nNumberOfBytesToRead :
Win32.Dword;
lpNumberOfBytesToRead :
Win32.LPDword;
lpOverlapped
: LPOVERLAPPED)
return Win32.BOOL
Thanks for any kind of help
Antoine (a happy newbie)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using windows API functions
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
0 siblings, 1 reply; 3+ messages in thread
From: Martin C. Carlisle @ 1998-07-10 0:00 UTC (permalink / raw)
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.
--Martin
--
Martin C. Carlisle, Computer Science, US Air Force Academy
mcc@cs.usafa.af.mil, http://www.usafa.af.mil/dfcs/bios/carlisle.html
DISCLAIMER: This content in no way reflects the opinions, standard or
policy of the US Air Force Academy or the United States Government.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using windows API functions
1998-07-10 0:00 ` Martin C. Carlisle
@ 1998-07-10 0:00 ` Stephen Leake
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Leake @ 1998-07-10 0:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-07-10 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox