home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / scottman / sysinfo.bas < prev   
Encoding:
BASIC Source File  |  1995-09-06  |  1.4 KB  |  76 lines

  1. DefInt A-Z
  2. Declare Function GetWindowsDirectory Lib "Kernel" (ByVal Buff$, ByVal sizeBuf)
  3. Declare Function GetSystemDirectory Lib "Kernel" (ByVal Buff$, ByVal sizeBuf)
  4.  
  5. Const GCW_HMODULE = -16
  6.  
  7. Const WF_CPU286 = &H2
  8. Const WF_CPU386 = &H4
  9. Const WF_CPU486 = &H8
  10. Const WF_STANDARD = &H10
  11. Const WF_ENHANCED = &H20
  12. Const WF_8087 = &H400
  13.  
  14. Function CPU ()
  15.     Match = 1
  16.     Select Case Match
  17.     Case (Flags& And WF_CPU486) \ WF_CPU486
  18.         CPU = 486
  19.     Case (Flags& And WF_CPU386) \ WF_CPU386
  20.         CPU = 386
  21.     Case Else
  22.         CPU = 286
  23.     End Select
  24. End Function
  25.  
  26. Function EXEName$ ()
  27.     Wnd = Screen.ActiveForm.hWnd
  28.     Buff$ = Space$(255)
  29.     EXEName$ = Left$(Buff$, TChars)
  30. End Function
  31.  
  32. Function FKeys ()
  33. End Function
  34.  
  35. Function FreeMem& ()
  36. End Function
  37.  
  38. Function KBSubType ()
  39. End Function
  40.  
  41. Function KBType ()
  42. End Function
  43.  
  44. Function MathChip ()
  45.     Flags& = GetWinFlags&
  46.     If Flags& And WF_8087 Then
  47.     MathChip = True
  48.     Else
  49.     MathChip = False
  50.     End If
  51. End Function
  52.  
  53. Function Mode ()
  54.     Flags& = GetWinFlags&
  55.     If Flags& And WF_ENHANCED Then
  56.     Mode = WF_ENHANCED
  57.     Else
  58.     Mode = WF_STANDARD
  59.     End If
  60. End Function
  61.  
  62. Function SysDir$ ()
  63.     Buff$ = Space$(255)
  64.     SysDir$ = Left$(Buff$, TChars)
  65. End Function
  66.  
  67. Function WinDir$ ()
  68.     Buff$ = Space$(255)
  69.     TChars = GetWindowsDirectory(Buff$, 255)
  70.     WinDir$ = Left$(Buff$, TChars)
  71. End Function
  72.  
  73. Function WinVer ()
  74. End Function
  75.  
  76.