home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os2 / programm / 7133 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.9 KB  |  41 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!jvnc.net!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
  2. From: dic5340@hertz.njit.edu (David Charlap)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: DOS Box Programming
  5. Message-ID: <1992Dec18.220158.3726@njitgw.njit.edu>
  6. Date: 18 Dec 92 22:01:58 GMT
  7. References: <boh.724320875@sfu.ca> <1992Dec14.180704.29564@wicat.com> <1992Dec17.230826.5577@midway.uchicago.edu>
  8. Sender: news@njit.edu
  9. Organization: New Jersey Institute of Technology, Newark, N.J.
  10. Lines: 28
  11. Nntp-Posting-Host: hertz.njit.edu
  12.  
  13. In article <1992Dec17.230826.5577@midway.uchicago.edu> sip1@midway.uchicago.edu writes:
  14. >In article <1992Dec14.180704.29564@wicat.com> kevin@wicat.com (Kevin Vigor) writes:
  15. >>>   1.  Is there a way to detect if a programme is operation in OS/2 2.0's
  16. >>>       dos box ?
  17. >
  18. >How about looking for an OS/2 2.x-specific file that will always be in
  19. >the same location?
  20.  
  21. Like what?  Any file you can name will also be present if the user is
  22. running straight DOS on a dual-boot machine.  All this can tell you is
  23. whether or not OS/2 was installed.  It won't tell you if you're
  24. running OS/2 or not.
  25.  
  26. The dos version number will tell you if you're running the emulator
  27. (look for version 10 or greater, or call "ver" and note that it will
  28. say "OS/2..."), but I can think of know way to tell a VMB from a
  29. normal DOS boot.  Unless you want to play around with protected mode.
  30.  
  31. What about this:  Detect the CPU type.  If it's a 386, try to go into
  32. protected mode.  If it fails, you're in a VMB - probably OS/2, but
  33. Windows 3.1 may also cause this effect.  Of course, there are standard
  34. ways to check if you're running Windows.
  35.  
  36. -- 
  37.   |)  David Charlap          | .signature confiscated by FBI due to
  38.  /|_  dic5340@hertz.njit.edu | an ongoing investigation into the
  39. ((|,)                        | source of these .signature virusses
  40.  ~|~
  41.