[DUG] Windows update breaks CRT unit
bosborn at xtra.co.nz
bosborn at xtra.co.nz
Thu Apr 20 10:41:41 NZST 2006
Here's one for aging Delphi developers.
I use Pascal to teach introductory programming with Delphi console applications. To spice up the look of the console we sometimes use a replacement CRT unit that duplicates the one we had in Turbo Pascal.
It appears the latest Windows update has broken it by fixing some sort of security flaw - just including CRT to the uses clause causes runtime error 201 (range check).
The problem can be (apparently) fixed by commenting out the following line from __InitVideo in the CRT source.
LastMode := __WhichMode(0, _ScreenHeight, _ScreenWidth);
I haven't had time to investigate __WhichMode any further but CRT seems to work again.
Bob Osborn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 4310 bytes
Desc: not available
Url : http://ns3.123.co.nz/pipermail/delphi/attachments/20060420/ec0d609d/winmail.bin
-------------- next part --------------
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
More information about the Delphi
mailing list