[fpc-pascal]Detecting Windows
James_Wilson at i2.com
James_Wilson at i2.com
Thu Feb 1 20:15:40 CET 2001
> Hi, I am currently writing a program and for it to work
> correctly it must run in real DOS mode, that is not from
> an MS-DOS prompt in Windows. Is there any reliable method
> for detecting the presence of the Windows OS 3.1 9x and
> NT like interrupt calls perhaps ??
Perhaps this function will work...
Function WindowsRunning : boolean;
var
regs : registers;
begin
regs.ax := $00;
regs.ah := $16;
regs.al := $0A;
intr ($2F, regs);
if regs.ax = 0 then
WindowsRunning := TRUE
else
WindowsRunning := FALSE;
end;
More information about the fpc-pascal
mailing list