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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,11061552bd31311d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-06 09:30:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp-relay.ihug.net!ihug.co.nz!west.cox.net!cox.net!news-out.visi.com!hermes.visi.com!news From: cjsonnack@mmm.com (Programmer Dude) Newsgroups: comp.lang.ada Subject: Re: Help on translating this thing in ada Date: Wed, 06 Nov 2002 11:23:15 -0600 Organization: 3M Company Message-ID: <3DC95003.33DC2119@mmm.com> References: <0552b568e58f18d139d6ce0ec4c204ff.110780@mygate.mailgate.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en]C-CCK-MCD 3M/NCP 4.5 (WinNT; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:30474 Date: 2002-11-06T11:23:15-06:00 List-Id: Sim Con wrote: > Hello! In my search for an ada code for a winnt cpu usage program i > found some problem translating this instruction > > typedef LONG (WINAPI *PROCNTQSI)(UINT,PVOID,ULONG,PULONG); > > this seems needed for define PROCNTQSI NtQuerySystemInformation; and the > dll call NtQuerySystemInformation. Any help? Thanx in advance!!! This defines PROCNTQSI as a pointer to a function that returns a LONG (long) and takes a UINT (unsigned int), a PVOID (void* -- an untyped data pointer), a ULONG (unsigned long) and a PULONG (a pointer to an unsigned long (probably an Ada-style "in out" parameter). The WINAPI symbol has to do with the calling convention. Probably what this defines is the signature of a callback function. -- |_ CJSonnack _____________| How's my programming? | |_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL | |_____________________________________________|_______________________| Opinions expressed herein are my own and may not represent those of my employer.