DOS or Windows DOS-box? 
Author Message
 DOS or Windows DOS-box?

Is it possible for a program to determine whether it is running in a
Windows-DOS-box or not?

Maybe there is a memory-location you van PEEK in?

Henk van Beek



Tue, 06 Oct 1998 03:00:00 GMT  
 DOS or Windows DOS-box?

Quote:
>Is it possible for a program to determine whether it is running in a
>Windows-DOS-box or not?

>Maybe there is a memory-location you van PEEK in?

Interrupt needs to be used. Try ftp://members.aol.com/markkkim/BASIC for a
program called BWin. It'll tell you if you are running Windows, and if so,
the Windows version number.

-Mark



Thu, 15 Oct 1998 03:00:00 GMT  
 DOS or Windows DOS-box?


: >Is it possible for a program to determine whether it is running in a
: >Windows-DOS-box or not?
: >Maybe there is a memory-location you van PEEK in?

Crescent Tool Pack offers routines that tell you whether you are running
in a dos box under Windows, Win95 or OS/2
--
Robert Gelb
Senior Systems Analyst
Data Express
Garden Grove, California USA
(714)895-8832



Thu, 15 Oct 1998 03:00:00 GMT  
 DOS or Windows DOS-box?

I needed to do this in a program recently and came up with the following
function which returns the
version of windows it is running under or -1 when windows is not present.
This is a GFA basic for DOS routine which calls interrupt 2Fh function
1600h. If windows is present the version number is returned encoded into
the AL and AH registers. The interrupt call also returns info on whether
windows is running in real or protected mode but thats another story :-)

FUNCTION is_win

 LOCAL max_ver|

  ~INTR($2f,_AX=$1600)
  max_ver|=_AL AND $7f

  IF max_ver|>0
   RETURN max_ver|*100+_AH
  ENDIF

  RETURN -1

ENDFUNC

Hope this helps someone out there.                   Regards Alan GI4MUN



Fri, 16 Oct 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VBDOS Basic DOS using Timer in Windows DOS box

2. VBDOS Basic DOS using Timer in Windows DOS box

3. NetBios/Dos Windows/Dos EXE properties

4. Running a MS-DOS programm in a DOS-BOX

5. Bis : DOS/Basic in Windows Box : particularities ?

6. DOS/Basic in Windows Box : particularities ?

7. How to create Terminal/DOS-box windows (background color definable per character)

8. Closing DOS sessions (windows, boxes)

9. Shelling to dos and retreiving dos error's

10. Free Beta Visual Basic Dos Compiler (DOS, WIN95/NT,Linux)

11. basic-dos or c-dos

12. Help: hiding a DOS window when executing a DOS batch file

 

 
Powered by phpBB® Forum Software