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-Thread: 103376,d0077c2a3f44fc09 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!feed.news.tiscali.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.hanau.net!news-fra1.dfn.de!newsfeed.pionier.net.pl!pwr.wroc.pl!panorama.wcss.wroc.pl!news.man.lodz.pl!not-for-mail From: "S�awo - MIR" Newsgroups: comp.lang.ada Subject: Re: Port LPT + ADA (whta do I wrong?) Date: Sat, 4 Dec 2004 19:05:44 +0100 Organization: LODMAN - Metropolitan Area Network in LODZ, Poland Message-ID: References: NNTP-Posting-Host: r1ds.p.lodz.pl X-Trace: kujawiak.man.lodz.pl 1102183544 23284 212.51.207.146 (4 Dec 2004 18:05:44 GMT) X-Complaints-To: abuse@man.lodz.pl NNTP-Posting-Date: Sat, 4 Dec 2004 18:05:44 +0000 (UTC) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-Priority: 3 X-MSMail-Priority: Normal Xref: g2news1.google.com comp.lang.ada:6758 Date: 2004-12-04T19:05:44+01:00 List-Id: Hello! Maybe someone tell me what do I wrong (??), or maybe everything is wrong ;-) :/ These are the fragments of my code: Variables: hLPT : Win32.Winnt.HANDLE; struktura : Win32.Winbase.LPOVERLAPPED; read : aliased DWORD; type LPT1_Bajt is record Busy : boolean; ACK : boolean; Paper : boolean; Sel : boolean; Error : boolean; Trzy_z : boolean; end record; for LPT1_Bajt use record Busy at 0 range 7..7; --pin 11 (zanegowany) ACK at 0 range 6..6; --pin 10 Paper at 0 range 5..5; --pin 12 Sel at 0 range 4..4; --pim 13 Error at 0 range 3..3; --pin 15 Trzy_z at 0 range 0..2; --trzy zera na poczatku end record; Reading from LPT Port: st : aliased LPT1_Bajt; struktura.OffsetHigh := 16#379#; !!!! In this place (after compiling, building and runnig it) appears an error: "CONSTRAINT_ERROR access check failed" !!!! if Win32.Winbase.Readfile(hLPT, st'address, Dword(1), read'access, struktura) = Win32.False then Put_Line ("Nie udalo sie odpalic LPT"); raise LPT_Error; end if; Opening LPT port: hLPT := Win32.Winbase.CreateFile ( CP ("LPT1" & ASCII.Nul), Win32.Winnt.GENERIC_READ, 0, null, Win32.Winbase.OPEN_EXISTING, Win32.Winbase.FILE_FLAG_OVERLAPPED, System.Null_Address);