From: "S�awo - MIR" <mszajac@poczta.onet.pl>
Subject: Re: Port LPT + ADA (whta do I wrong?)
Date: Sat, 4 Dec 2004 19:05:44 +0100
Date: 2004-12-04T19:05:44+01:00 [thread overview]
Message-ID: <cosu9o$mnk$1@kujawiak.man.lodz.pl> (raw)
In-Reply-To: copra3$a8p$1@kujawiak.man.lodz.pl
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);
next prev parent reply other threads:[~2004-12-04 18:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-03 13:56 Port LPT + ADA S�awo - MIR
2004-12-03 14:40 ` Martin Krischik
2004-12-03 15:29 ` Slawo - MIR
2004-12-03 18:46 ` Martin Krischik
2004-12-03 18:43 ` tmoran
[not found] ` <u111r0db4fsoj9u3hlkachspjt0r2vvup7@4ax.com>
2004-12-03 23:03 ` Adrien Plisson
2004-12-03 23:51 ` Slawo - MIR
2004-12-04 0:51 ` Jeffrey Carter
2004-12-04 18:05 ` S�awo - MIR [this message]
2004-12-04 20:20 ` Port LPT + ADA (whta do I wrong?) Dmitry A. Kazakov
2004-12-07 18:13 ` Slawo - MIR
2004-12-07 20:55 ` Dmitry A. Kazakov
2004-12-08 4:28 ` Steve
2004-12-08 8:27 ` Dmitry A. Kazakov
2004-12-12 22:25 ` Brian May
2004-12-14 2:41 ` Steve
2004-12-12 22:46 ` Brian May
2004-12-12 23:03 ` Adrien Plisson
[not found] ` <rt8dr09tuvgbqaeq9vmujd1pqtb72hbamv@4ax.com>
2004-12-09 8:17 ` Jerry van Dijk
2004-12-05 6:45 ` Brian May
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox