home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol10n17.zip / WINVER.ZIP / WINVER3 < prev    next >
Text File  |  1991-09-12  |  741b  |  28 lines

  1. Declare Function GetVersion Lib "kernel" () As Integer
  2. Declare Function GetWinFlags Lib "kernel" () As Long
  3. Declare Function GetSystemMetrics Lib "user" \
  4.     (nIndex As Integer) As Integer
  5.  
  6. Function LO(x)
  7.     LO = x Mod 256
  8. End Function
  9.  
  10. Function HI(x)
  11.     HI = Int(x / 256)
  12. End Function
  13.  
  14. Sub MAIN
  15.     v = GetVersion
  16.     vers$ = "Windows v. " + Str$(LO(v)) + "." + Str$(HI(v))
  17.  
  18.     debug = GetSystemMetrics(22)        ' SM_DEBUG
  19.     If debug Then vers$ = vers$ + " (Debug)"
  20.  
  21.     flags = GetWinFlags
  22.     If flags And 1 = 0 Then mode$ = "Real mode"
  23.     If flags And 16 Then mode$ = "Standard (286) mode"
  24.     If flags And 32 Then mode$ = "Enhanced (386) mode"
  25.  
  26.     MsgBox vers$ + Chr$(10) + mode$, "WINVER"
  27. End Sub
  28.