마음의 안정을 찾기 위하여 - OS Version별 정보.
2265438
579
388
관리자새글쓰기
태그위치로그방명록
별일없다의 생각
dawnsea's me2day/2010
색상(RGB)코드 추출기(Color...
Connection Generator/2010
최승호PD, '4대강 거짓말 검...
Green Monkey**/2010
Syng의 생각
syng's me2DAY/2010
천재 작곡가 윤일상이 기획,...
엘븐킹's Digital Factory/2010
OS Version별 정보.
Windows | 2009/10/15 10:08

Windows95부터 Windows7까지.... OS의 종류가 너무나 많아졌다. -_-;
개인적으로 만들고 있는 유틸리티 프로그램중 하나인 스크린펜이 Windows7에서 동작하지 않는 버그때문에 골머리를 앓고 있다.... 헌데 Windows7을 테스트할 수가 없으니.... -_-; 대략 안습....



Introduction

This article explains how to determine Windows version and edition. The method is very simple: The Windows API provides two functions, GetVersion/GetVersionEx, that fill the structure OSVERSIONINFO/OSVERSIONINFOEX with information such as major and minor version, product type, suite mask, platform, and so forth. This article, however, and the code provided here, does not list all the operating systems ever released by Microsoft, only the most usual ones.

The GetVersionEx() function from Platform SDK obtains extended information about the version of the operating system that is currently running. It uses an OSVERSIONINFO or OSVERSIONINFOEX (for Windows NT 4.0 SP6 and later) structure to retrieve the operating system version information.

The information in OSVERSIONINFO includes major and minor version numbers, a build number, a platform identifier, and descriptive text about the operating system.

The information in OSVERSIONINFOEX includes major and minor version numbers, a build number, a platform identifier, and information about product suites and the latest Service Pack installed on the system.

Note: GetVersionEx only returns correct information if the process does not run under a compatibility layer.



OS Versions

Before trying to retrieve the system version, I will explain how one can differentiate among different versions and editions.

The Win32 platform groups the Win95, Win98, and WinMe operating systems.

사용자 삽입 이미지


All of them have the Major Version equal to 4, and the difference is made by the Minor Version: 0 for Win95, 10 for Win98, and 90 for WinMe. Win95 also comes in an OSR2 release, and you must use the CSD Version to determine the actual edition. If it is 'C' or 'B', it is a OSR2 edition. For Win98, if the CSD Version is 'A', Second Edition is present.

The Windows network platform gathers WinNT, Win2000, WinXP, Win Server 2003, Win Vista, and Win Server 2008.

The first difference is made by the major version:

  • 3 is for Windows NT 3.5
  • 4 is for the Windows NT 4
  • 5 is for Windows 2000, Windows XP, Windows Server 2003 and Windows Home Server
  • 6 is for Windows Vista, Windows Server 2008 and Windows 7


The minor version is used, for instance, to differentiate among Windows 2000 (0), Windows XP(1), Windows Home Server (2) and Windows Server 2003 (2). Both Windows Vista and Windows Server 2008 have the same minor version, 0. Windows 7 and Windows Server 2008 R2 have the minor version 1.

The product type groups the operating systems in servers (3), workstations (2), and domain controllers (1).

Another flag that differentiate between editions is the suite mask. It can indicate an enterprise edition (0x0002), data center edition (0x0080), a personal/home edition (0x0200), or a web edition (0x0400).

A better, visual, grouping of the operating systems is shown in the following images.

For Windows NT:

사용자 삽입 이미지


For Windows 2000, XP, Server 2003 and Home Server:

사용자 삽입 이미지


For Windows Vista, Server 2008 and Windows 7:

사용자 삽입 이미지

In addition to that, on Windows Vista and Windows Server 2008 a new function is available in kernel32.dll, called GetProductInfo(). It retrieves the product type for the operating system on the local computer, and maps the type to the product types supported by the specified operating system. You have to supply the major and minor version of the OS and the major and minor version of the service pack; then it returns a value that can indicate an unknown product, and unlicensed product or a specific edition such as business, ultimate, enterprise, enterprise server, and so on. For more about the function and possible value, see MSDN.

Determining Windows Vista, Windows Server 2008 and Windows 7 edition based on the product type returned by GetProductInfo():

사용자 삽입 이미지


출처 : http://www.codeguru.com/cpp/misc/misc/system/article.php/c8973/

2009/10/15 10:08 2009/10/15 10:08
Article tag list Go to top
View Comment 3
Trackback URL :: 이 글에는 트랙백을 보낼 수 없습니다
From. 구차니 2009/10/15 12:25
답글달기삭제
그래도 윈도우는 계보가 단순하잖아요 ㅎㅎ
UNIX/LINUX 계열은... GG 입니다 ㅋ
From. 코즈 2010/01/26 14:47
답글달기삭제
좋은 정보 감사드립니다.
괜찮으시면 제 블로그로 퍼가도 될까요?
From. 그리움 2010/01/26 21:02
삭제
위 글은 본문에서도 밝혔듯이 원본의 출처가 따로 있습니다.
굳이 제 허락을 받지 않으셔도 될 듯 합니다.

저도 외국 사이트에서 스크랩 해 온 자료이기 때문에, 제가 허락을 해드릴 그런 권한이 없다는거죠. ^^;
PREV : [1] : NEXT
 
 
 
 
: [1] ... [346][347][348][349][350][351][352][353][354] ... [1317] :
«   2024/03   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
전체 (1317)
출판 준비 (0)
My-Pro... (41)
사는 ... (933)
블로그... (22)
My Lib... (32)
게임 ... (23)
개발관... (3)
Smart ... (1)
Delphi (93)
C Builder (0)
Object... (0)
VC, MF... (10)
Window... (1)
Open API (3)
Visual... (0)
Java, JSP (2)
ASP.NET (0)
PHP (5)
Database (12)
리눅스 (29)
Windows (25)
Device... (1)
Embedded (1)
게임 ... (0)
Web Se... (2)
Web, S... (21)
잡다한... (6)
프로젝트 (0)
Personal (0)
대통령... (13)
Link (2)