CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Location
    Germany
    Posts
    37

    Win95 or NT?! (how to find out!)

    My question is if there is a reliable way to say wheather my application is
    currently running on NT, Win95 or Win98

    Thanx for your help!

    Ronny


  2. #2
    Join Date
    May 1999
    Location
    Wisconsin, USA
    Posts
    953

    Re: Win95 or NT?! (how to find out!)

    Try this:

    // NT 5.0 will require a different structure OSVERSIONINFOEX
    OSVERSIONINFO verInfo;
    ZeroMemory(&verInfo, sizeof(verInfo));
    verInfo.dwOSVersionInfoSize = sizeof(verInfo);

    // find out if running on NT or WIN95
    if (GetVersionEx(&verInfo) == 0)
    {
    WFSShowLastError("Error", "Unable to retrieve Operating System information.", "", GetLastError());

    }
    else
    {

    // WIN95 or WIN98
    if (verInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
    {
    // do something
    }
    else if (verInfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
    {
    // something
    }



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

Featured