⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dtwinver.htm

📁 DtWinVer is a C++ class which provides a comprehensive method to determine which OS the program that
💻 HTM
📖 第 1 页 / 共 2 页
字号:
</ul>

<p><strong>v1.61 (8 October 2002)</strong> 

<ul>
  <li> Now uses OSVERSIONINFOEX it possible in the Win32 or Win64 code paths. 
	This provides for more reliably detection of Windows XP Home Edition.</li>
  <li>Renamed the functions which detect Windows .NET Server 2003. Also updated 
	the test code which prints out these names</li>
  <li>Provided explicit support for Windows .NET Web Server</li>
  <li>Fixed a bug in the display of the minor OS version number on Windows .NET 
	Server.</li>
  <li>Made the project for WriteVer a VC 5 project instead of VC 6 which it was 
	up until now.</li>
  <li>Reworked the internal function WhichNTProduct to use a constant input 
	string parameter</li>
  <li>Added explicit support for Windows NT / 2000 / XP Embedded</li>
  <li>Added explicit support for detecting Terminal Services in remote admin 
	mode</li>
</ul>

<p><strong>v1.62 (11 October 2002)</strong> 

<ul>
  <li>Fixed a problem where on Windows XP, the test program will include the 
	text &quot;(Standard Edition)&quot;</li>
  <li>Added two variables to the OS_VERSION_INFO structure to report the minor 
	service pack number</li>
  <li>Removed the OS_VERSION_INFO structure from the global namespace</li>
  <li>Removed all static member variables from the class</li>
  <li>Added a member variable to the OS_VERSION_INFO to return the various 
	&quot;suites&quot; installed</li>
  <li>Reduced the number of calls to WriteVer to 1 when called from dos 
	code path.</li>
  <li>Completely reworked the internal WhichNTProduct method</li>
  <li>General tidy up of the header file</li>
  <li>Completely reworked the ValidateProductSuite method</li>
  <li>Now only 1 call is made to WhichNTProduct throughout a single call to 
	COSVersion::GetVersion</li>
  <li>Now only 1 call is made to ValidateProductSuite throughout a single call 
	to COSVersion::GetVersion</li>
  <li>Fixed an unitialized variable problem in COSVersion::IsUnderlying64Bit</li>
  <li>Changed &quot;WhichNTProduct&quot; method to &quot;GetNTOSTypeFromRegistry&quot;</li>
  <li>Changed &quot;ValidateProductSuite&quot; method to 
	&quot;GetProductSuiteDetailsFromRegistry&quot;.</li>
  <li>Now correctly reports on Terminal Services being in Remote Admin Mode on 
	OS which do not support calling GetVersionEx using an OSVERSIONINFOEX 
	structure i.e any NT 4 install prior to SP6.</li>
  <li>16 bit Windows code path now reports as much NT information as the Win32 
	code path&nbsp;</li>
  <li>Fixed a bug in COSVersion::GetInfoBySpawingWriteVer which was failing if 
	it encountered an empty CSD string. This was spotted on Windows .NET Server 
	which since it is in beta still (as of October 2002) does not have any 
	service pack!.</li>
</ul>

<p><strong>v1.63 (10 January 2003)</strong> 

<ul>
  <li>Update to support MS deciding to change the name of their Whistler Server 
	product. The product will now be called &quot;Windows Server 2003&quot;.</li>
</ul>

<p><strong>v1.64 (30 January 2003)</strong> 

<ul>
  <li>Added explicit support for detecting NT Service Pack 6a</li>
</ul>

<p><strong>v1.65 (8 February 2003)</strong> 

<ul>
  <li>Added explicit support for detecting Windows XP Service Pack 1a</li>
  <li>Added support to determine the HAL on NT Kernels. Thanks to Christian 
	Kaiser for suggesting this addition.</li>
</ul>

<p><strong>v1.66 (12 February 2003)</strong> 

<ul>
  <li>Fixed a compiler warning in GetNTServicePackFromRegistry which occurs when 
	the code is compiled with the Watcom compiler. Thanks to Christian Kaiser 
	for reporting this.</li>
</ul>

<p><strong>v1.67 (8 March 2003)</strong><ul>
  <li>Updated a comment in COSVersion::GetProductSuiteDetailsFromRegistry re NT 
	Embedded.</li>
  <li>A comment from John A. Vorchak: On NTe (NT Embedded) and XPE (XP 
	Embedded), all of the versions (of DTWinver) work just fine so long as the 
	components to support them are included in the images, which itself is kind 
	of a crap shoot. I think that you would probably find that most images will 
	not support the DOS or Win16 versions however most will support the Win32. 
	Many of the images that folks build either do not include the DOS subsystem 
	and some of them do not include Explorer, so it really can't be said that 
	all builds will support them however it is not difficult for a developer to 
	understand which version would work for them as they understand their target 
	systems better than anyone and at least one version would certainly work for 
	almost all images. As far as Win2k (Server Appliance Kit), I haven't done 
	enough testing with that platform, nor do I currently have any built images 
	with the SAK to say positively or otherwise. More than likely you would find 
	no problems with the SAK images since they typically follow W2k much more 
	than NTe or XPE do. Author: If you are writing for an embedded OS, then 
	there is little use for DTWinver!!, since the developer has very tight 
	control over the runtime environment. Also if you do use DTWinver on an 
	embedded version of Windows, you will probably compile in the dtwinver code 
	rather than ship the sample binaries I include in the dtwinver download.</li>
</ul>

<p><strong>v1.68 (10 April 2004)</strong><ul>
  <li>Removed a number of unreferenced variable warnings when you compile the 
	code on VS.NET 2003. Thanks to Edward Livingston for reporting these issues.</li>
  <li>Now includes support for Windows XP Media Center Edition. Please note that 
	if you want to do specific version checking of what version of Media Center 
	you have installed then you should use my CVersionInfo classes at <a href="http://www.naughter.com/versioninfo.html">
  http://www.naughter.com/versioninfo.html</a> in conjunction with the following 
	information which I culled from
  <a href="http://salloway.org.uk/mediacenter/2004/version.htm">
	http://salloway.org.uk/mediacenter/2004/version.htm</a> which describes 
	the various version numbers of ehshell.exe in \Windows\ehome to the 
	corresponding versions of XP Media Center Edition.</li>
	<li>dtwinver now returns the processor architecture via a call to 
	GetSystemInfo or GetNativeSystemInfo. This is used to differentiate between 
	64 Bit Windows on Itanium and AMD64 processors.</li>
	<li>Renamed the global preprocesor defines used by dtwinver to use more unique 
	names</li>
	<li>Added make files and binaries for AMD64 processors.</li>
</ul>

<p><strong>v1.69 (26 June 2005)</strong></p>

<ul>
  <li>INTEL_PROCESSOR enum is now more correctly know as IA32 which means x86 32 
	bit.</li>
  <li>Fixed a bug where the OS_VERSION_INFO parameter was not be zero set in the 
	function COSVersion::GetVersion. Thanks to &quot;Remio&quot; for reporting this issue.</li>
</ul>

<p><b>v1.70 (29 June 2005)</b></p>

<ul>
  <li>Added support for detecting if code is running on Tablet PC Edition of 
	Windows.</li>
  <li>Code now uses GetSystemMetrics call in preference to direct registry calls 
	to detect Media Center Edition of Windows.</li>
  <li>Renamed the functions which differentiate between the different OEM 
	Service Release versions of Windows 95. They are OSR 2[.1] = Win95B, OSR2.5 
	= Win95C. For the gory details please see the KB article at
    <a href="http://support.microsoft.com/kb/q158238/">                          
	http://support.microsoft.com/kb/q158238/</a>. The code now also explicitly 
	supports Win95C.</li>
</ul>

<p><b>v1.71 (22 July 2005)</b></p>

<ul>
  <li> Now includes support for Windows Vista, formerly Windows codename 
	&quot;Longhorn&quot;.</li>
</ul>

<p><b>v1.72 (6 September 2005)</b></p>

<ul>
  <li>Renamed some of the functions 
	which detect Longhorn Server. Previously the functions were incorrectly 
	referring to Vista Server. Vista is the name of the Windows Client. As of 
	yet, a product name has not been picked for Longhorn Server.</li>
  <li>Now includes support for 
	Windows Server 2003 R2.</li>
  <li>Now includes support for 
	Windows XP Starter Edition and any future versions such as Windows Vista 
	Starter Edition</li>
</ul>

<p><b>v1.73 (17 May 2006)</b></p>

<ul>
  <li>Updated copyright details.</li>
	<li>Updated documentation to use the same style as the web site.</li>
	<li>Updated documentation on version numbers which XP Media Center can have.</li>
	<li>Added support for Windows Server 2003, Computer Cluster Edition</li>
	<li>Added support for Windows Storage Server 2003 R2</li>
	<li>Added support for detecting if Windows is installed in a &quot;Security 
	Application&quot; mode</li>
	<li>Added support for detecting BackOffice components are installed</li>
	<li>Provided Visual Studio 2005 solution to build DtWinver with.</li>
</ul>

<p><b>v1.74 (21 September 2006)</b></p>

<ul>
  <li>Included support for detecting all the different types of Vista SKU's, 
	namely: Windows Vista Starter Edition, Windows Vista Home Basic N, Windows 
	Vista Home Basic, Windows Vista Home Premium, Windows Vista Business N, 
	Windows Vista Business, Windows Vista Enterprise, and Windows Vista 
	Ultimate.</li>
	<li>Fixed a bug in the displaying of unknown versions of Windows in the 
	sample app</li>
</ul>

<p><b>v1.75 (18 May 2007)</b></p>

<ul>
  <li>Updated copyright details.</li>
	<li>Updated code to refer to Windows Server 2008 which was formerly known as 
	Windows Server codename &quot;Longhorn&quot;.</li>
</ul>

<p><b>v1.76 (20 June 2007)</b></p>

<ul>
	<li>Include support for detecting Windows Home Server. Thanks to  
	Petr Stejskal for suggesting this update.</li>
</ul>

<p><b>v1.77 (14 June 2008)</b></p>

<ul>
	<li>Updated copyright details</li>
	<li>Code now compiles cleanly using Code Analysis (/analyze)</li>
	<li>Added support for Vista Home Premium N</li>
	<li>Added support for Vista Business N</li>
	<li>Added support for Vista Enterprise N</li>
	<li>Added support for Vista Ultimate N</li>
	<li>Added support for Windows Core Server</li>
	<li>Added support for Windows Hyper-V</li>
	<li>Added support for Windows Essential Business Server Management Server</li>
	<li>Added support for Windows Essential Business Server Messaging Server</li>
	<li>Added support for Windows Essential Business Server Security Server</li>
	<li>Added support for Windows Storage Server Enterprise Edition</li>
	<li>Added support for Windows Storage Server Express Edition</li>
	<li>Added support for Windows Storage Server Standard Edition</li>
	<li>Added support for Windows Storage Server Workgroup Edition </li>
	<li>Added support for Windows Cluster Server Edition </li>
	<li>Added support for Windows Business Server Premium Edition</li>
</ul>
<p><b>v1.77 (15 December 2008)</b></p>
<ul>
	<li>Added support for detecting Windows 7</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>

<p>&nbsp;</p>

<h2><a name="API"></a>API</h2>

<p>The API provided is through a C++ class namely &quot;COSVersion&quot;. It provides a 
number of functions, the most important being &quot;GetVersion&quot; which does the actual 
version detection. There are a number of additional functions which tell you if 
a certain &quot;flavour&quot; of an operating system is installed. For more info on how to 
use the function, please see the code in test.cpp.</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<h2><a name="Notes"></a>Notes</h2>

<p>The code uses C++ but does not 
use MFC. Files are also included which builds a simple application which reports 
the OS version, through a message box on Windows and stdio in DOS.</p>

<p>The mak files are: 

<ul>
  <li>dosver.mak (VC 1.5x for DOS)</li>
  <li>winver.mak (VC 1.5x for Win16)</li>
  <li>winverce3.vcw (Embedded Visual 
	C++ 3 for Windows CE).</li>
  <li>winverce4.vcw (Embedded Visual 
	C++ 4 for Windows CE).</li>
  <li>winver32.sln (Visual Studio 2005 solution for Win32 and x64)</li>
</ul>

<p>Also included in the winver32 
workspace is a sub project to build the WriteVer executable needed for the 16 
bit DOS code path in DtWinVer.</p>

<p>Areas where the code may prove 
useful are:

<ul>
  <li>A DOS program wants to know if 
	it can be allowed access to hardware ports which is not available on NT, but 
	is available on DOS, Windows 3.x &amp; Windows 95.</li>
  <li>A Win32 program wants to know 
	if the Windows 95 UI is available.</li>
  <li>A Win16 program wants to know 
	if it can call the Win32 API via generic thunking.</li>
  <li>Checking for the existence of 
	a certain service pack on Windows 95, 98, 2000 or XP.</li>
</ul>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<h2><a name="Contact"></a>Contacting the Author</h2>

<p>PJ Naughter<br>
Email: <a href="mailto:pjna@naughter.com">pjna@naughter.com</a><br>
Web: <a href="http://www.naughter.com">http://www.naughter.com</a><br>
15 December 2008</p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -