From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b8bbbb20e001f1b1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news.agarik.com!usenet-fr.net!news.enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Pointers, C, Win32 API Date: Tue, 19 Apr 2005 20:00:59 -0400 Organization: Cuivre, Argent, Or Message-ID: References: <1113952418.548084.275020@o13g2000cwo.googlegroups.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1113955277 21664 212.85.156.195 (20 Apr 2005 00:01:17 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Wed, 20 Apr 2005 00:01:17 +0000 (UTC) Cc: comp.lang.ada@ada-france.org To: "Steve" Return-Path: In-Reply-To: <1113952418.548084.275020@o13g2000cwo.googlegroups.com> (cybaflea@hotmail.com's message of "19 Apr 2005 16:13:38 -0700") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:10594 Date: 2005-04-19T20:00:59-04:00 "Steve" 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