Results 1 to 3 of 3

Thread: determine OS

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    1

    Angry determine OS

    I need some help finding an API call that will return the OS that is running on the machine. I've found just about every piece of info about the OS, but not which OS (NT, 95, 98, etc)...I'm about to go insane!!!

  2. #2
    Hyperactive Member Jason Badon's Avatar
    Join Date
    Feb 2001
    Location
    Colorado
    Posts
    329
    this project will tell you if it is windows 9x or NT
    works on NT,95,98,2000,XP

    hope this helps you

    Jason

  3. #3
    Hyperactive Member zer0_flaw's Avatar
    Join Date
    Apr 2001
    Posts
    448
    Code:
    'put this in a module
    Declare Function GetVersionEx Lib "kernel32.dll" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
    
    Type OSVERSIONINFO
      dwOSVersionInfoSize As Long
      dwMajorVersion As Long
      dwMinorVersion As Long
      dwBuildNumber As Long
      dwPlatformId As Long
      szCSDVersion As String * 128
    End Type
    Code:
    'displays the major and minor version numbers of windows
    'for example, 4.0 represents windows 95
    
    Dim os As OSVERSIONINFO, retval As Long
    os.dwOSVersionInfoSize = Len(os)
    retval = GetVersionEx(os)  
    Debug.Print "Windows version number:"; os.dwMajorVersion; "."; os.dwMinorVersion

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width