home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff339.lzh
/
PCQ
/
Runtime.lzh
/
Runtime
/
Extras
/
ConsoleUtils.p
< prev
next >
Wrap
Text File
|
1989-10-21
|
706b
|
32 lines
External;
{
These routines just open and close the Console device without
attaching it to any window. They update ConsoleBase, and are thus required
for RawKeyConvert and DeadKeyConvert.
}
{$I "Include/ExecIO.i"}
{$I "Include/InputEvent.i"}
var
ConsoleBase : Address; { external references }
ConsoleRequest : IOStdReq;
Procedure OpenConsoleDevice;
{
This procedure initializes ConsoleDevice, which is required for
CDInputHandler and RawKeyConvert.
}
var
Error : Integer;
begin
Error := OpenDevice("console.device", -1, Adr(ConsoleRequest), 0);
ConsoleBase := ConsoleRequest.ioReq.ioDevice;
end;
Procedure CloseConsoleDevice;
begin
CloseDevice(Adr(ConsoleRequest));
end;