PE> On Aug 05 01:21 94, Vitus Jensen of 2:2474/100.20 wrote:
VJ> Last Summer: Australia is really a long way to travel .
Actually it was Winter in August, from memory. If you think
Australia is slow, try Queensland! Twenty years and one hour
behind the rest of Australia! (the one hour is because they
don't have daylight saving). Once a friend of mine and I
found some really old Electronics Australia magazines (like
15-30 years old) that were advertising some free things, so
we filled them in and sent them with a note "sorry, but we're
pretty behind the times up here in Qld", but the companies
had since ceased to exist so we didn't get anything, except
the letter returned by the post office! I don't live in Qld
anymore. Actually, no-one lives in Qld, you either go there
for a holiday or to die (they don't/didn't have death duty).
VJ> You are lucky: I kept the code (but not the message).
VJ> Did I post kbhit() and cgetc()? I retried it 5 minutes ago and it still
VJ> works (OS/2 2.1GA) in fullscreen. Here is this small test program again
VJ> (would someone else please recheck):
Ah thankyou, that code you posted does indeed work. The previous
code was not the same as this new stuff. I will repost the old
code, just for interest's sake, the new code is what I am after.
Thanks + bye. Paul.
old code (do not capture!):
int kbhit(HFILE h)
{
USHORT para = 0;
ULONG para_len = sizeof(para);
KBDKEYINFO data;
ULONG data_len = sizeof(data);
APIRET rc;
rc = DosDevIOCtl( h, 4, 0x75,
¶, para_len, ¶_len,
&data, data_len, &data_len );
return para;
}
IOCtl 4/0x74:
{
para = 1;
return (data.chChar ? : data.chChar : data.chScan&0x0100);
}
@EOT:
---
* Origin: This is just another kludge line like SEENBY (3:711/934.9)
|