Game Development Reference
In-Depth Information
The following method is used to determine whether a CLR version is actually valid
and active within the operating system. This method is given a version number, and
the GetRequestedRuntimeInfo() method of mscoree is used to validate it.
BOOL CLRVersionCheck::IsVersionAvailable(LPCWSTR frameworkVersion)
{
Note
The source code for this method is available on the Companion Web site.
}
Example Usage
Using the version check library is very easy. To start, link to the static library file
( .lib ) and include the library header ( CLRVersionCheckLib.hpp ).
The following code shows a simple console application that enumerates a list of
available .NET framework versions and displays the results.
#include “stdafx.h”
#include <conio.h>
int _tmain(int argc, _TCHAR* argv[])
{
Note
The source code for this method is available on the Companion Web site.
Figure 45.1 shows the console application in action.
Figure 45.1 Screenshot of the console example in action.
 
Search Nedrilad ::




Custom Search