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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,72a0bc6240d264e3 X-Google-Attributes: gid103376,public From: Alfred Hilscher Subject: Re: Access and alias Date: 2000/04/05 Message-ID: <38EB55AE.D4A241FD@icn.siemens.de>#1/1 X-Deja-AN: 607096625 Content-Transfer-Encoding: 7bit References: <86d7o5ae23.fsf@ppp-169-201.villette.club-internet.fr> <86aej9aa8y.fsf@ppp-169-201.villette.club-internet.fr> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Siemens AG Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-04-05T00:00:00+00:00 List-Id: Laurent Guerby wrote: > > "NANCY HEHIR" writes: > > > I am trying to use SetCommState to configure a Comm Port. > > I have created a handle for COM1 using CreateFile. > > SetCommState takes as it's parameters the handle and a type LPDCB (access to > > the DCB) > > The type LPDCB is defined in Win32-winbase.ads > > Okay, win32, I see now, no way around this major braindamage then ;-). > > Last time I had to use the Win32 API, I manually imported the needed > entries (a dozen) using System.Address as parameter type and 'Address > on various things on the caller side. This way I avoided the > dependency on the Win32 binding hierarchy, hence easier build process. > Of course, after a dozen functions, I'd switch to use the Win32 > binding. If you write your own bindings, you shouldn't work with 'address. Use an in out parameter instead. E.g. proc (ref : SYSTEM.ADDRESS); --> proc (ref : in out X);