From: Stephen Leake <stephen_leake@acm.org>
To: "Steve" <cybaflea@hotmail.com>
Cc: comp.lang.ada@ada-france.org
Subject: Re: Pointers, C, Win32 API
Date: Tue, 19 Apr 2005 20:00:59 -0400
Date: 2005-04-19T20:00:59-04:00 [thread overview]
Message-ID: <mailman.57.1113955275.24457.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <1113952418.548084.275020@o13g2000cwo.googlegroups.com> (cybaflea@hotmail.com's message of "19 Apr 2005 16:13:38 -0700")
"Steve" <cybaflea@hotmail.com> writes:
> // Set up a key(directory info)
> hCompPort=CreateIoCompletionPort( DirInfo.hDir,
> hCompPort,
> (DWORD) &DirInfo,
> 0);
>
> ...
>
> // Set up a key(directory info)
> hCompPort := Winbase.CreateIoCompletionPort(
> FileHandle => DirInfo.hDir,
> ExistingCompletionPort => hCompPort,
> CompletionKey => ?????,
> NumberOfConcurrentThreads => 0);
>
>
> In ADA how do I do what the 'C' example is doing:
> ---> (DWORD) &DirInfo,
I don't have Winbase installed, so I don't know what type
CompletionKey is expecting. Please post the C and Ada declarations of
CreateIOCompletionPort; then I might be able to help more.
In general (as you probably know), '(DWORD) &DirInfo' is taking the
address of DirInfo, and converting it to a 32 bit integer. The direct
equivalent in Ada would be To_Integer_32 (DirInfo'Address) (where
To_Integer_32 is an instantiation of Unchecked_Conversion), but that's
probably _not_ what you want here.
--
-- Stephe
next prev parent reply other threads:[~2005-04-20 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-19 23:13 Pointers, C, Win32 API Steve
2005-04-20 0:00 ` Stephen Leake [this message]
2005-04-20 2:44 ` Steve
2005-04-20 23:29 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox