summaryrefslogtreecommitdiff
path: root/src/classlibnative
diff options
context:
space:
mode:
authorRahul Kumar <rahku@microsoft.com>2017-03-29 15:31:29 -0700
committerRahul Kumar <rahku@microsoft.com>2017-03-31 14:32:33 -0700
commit201c70cc49ff2027fb8ed0ba5e25f56534b04a96 (patch)
tree1e223c126c1a5c4819b6aa37492003aabd581d8d /src/classlibnative
parent07fa3a32336d2da5d2bf652ad01d33f18b2debaf (diff)
downloadcoreclr-201c70cc49ff2027fb8ed0ba5e25f56534b04a96.tar.gz
coreclr-201c70cc49ff2027fb8ed0ba5e25f56534b04a96.tar.bz2
coreclr-201c70cc49ff2027fb8ed0ba5e25f56534b04a96.zip
1. Remove disable of C4996
2. delete some dead code 3. Remove implementation of GetOSVersion and hardcode OS version to be 0.0.0 4. Add implementation of IsWindows8OrAbove & IsWinrtSupported (donno why this was deleted earlier) 5. remove GetVersionEx from PAL
Diffstat (limited to 'src/classlibnative')
-rw-r--r--src/classlibnative/bcltype/system.cpp91
-rw-r--r--src/classlibnative/bcltype/system.h3
2 files changed, 0 insertions, 94 deletions
diff --git a/src/classlibnative/bcltype/system.cpp b/src/classlibnative/bcltype/system.cpp
index 2767d1e749..c36d2e1066 100644
--- a/src/classlibnative/bcltype/system.cpp
+++ b/src/classlibnative/bcltype/system.cpp
@@ -609,8 +609,6 @@ FCIMPL2(VOID, SystemNative::FailFastWithException, StringObject* refMessageUNSAF
}
FCIMPLEND
-
-
FCIMPL0(FC_BOOL_RET, SystemNative::IsServerGC)
{
FCALL_CONTRACT;
@@ -636,95 +634,6 @@ BOOL QCALLTYPE SystemNative::WinRTSupported()
#endif // FEATURE_COMINTEROP
-// Helper method to retrieve OS Version based on the environment.
-BOOL GetOSVersionForEnvironment(LPOSVERSIONINFO lpVersionInformation)
-{
-#ifdef FEATURE_WINDOWSPHONE
- // Return phone version information if it is available
- if (!g_fGetPhoneVersionInitialized)
- {
- HMODULE hPhoneInfo = WszLoadLibrary(W("phoneinfo.dll"));
- if(hPhoneInfo != NULL)
- g_pfnGetPhoneVersion = (pfnGetPhoneVersion)GetProcAddress(hPhoneInfo, "GetPhoneVersion");
-
- g_fGetPhoneVersionInitialized = true;
- }
-
- if (g_pfnGetPhoneVersion!= NULL)
- return g_pfnGetPhoneVersion(lpVersionInformation);
-#endif // FEATURE_WINDOWSPHONE
-
- return ::GetOSVersion(lpVersionInformation);
-}
-
-
-/*
- * SystemNative::GetOSVersion - Fcall corresponding to System.Environment.GetVersion
- * It calls clr!GetOSVersion to get the real OS version even when running in
- * app compat. Calling kernel32!GetVersionEx() directly will be shimmed and will return the
- * fake OS version. In order to avoid this the call to getVersionEx is made via mscoree.dll.
- * Mscoree.dll resides in system32 dir and is never lied about OS version.
- */
-
-FCIMPL1(FC_BOOL_RET, SystemNative::GetOSVersion, OSVERSIONINFOObject *osVer)
-{
- FCALL_CONTRACT;
-
- OSVERSIONINFO ver;
- ver.dwOSVersionInfoSize = osVer->dwOSVersionInfoSize;
-
- BOOL ret = GetOSVersionForEnvironment(&ver);
-
- if(ret)
- {
- osVer->dwMajorVersion = ver.dwMajorVersion;
- osVer->dwMinorVersion = ver.dwMinorVersion;
- osVer->dwBuildNumber = ver.dwBuildNumber;
- osVer->dwPlatformId = ver.dwPlatformId;
-
- HELPER_METHOD_FRAME_BEGIN_RET_1(osVer);
- SetObjectReference((OBJECTREF*)&(osVer->szCSDVersion), StringObject::NewString(ver.szCSDVersion), GetAppDomain());
- HELPER_METHOD_FRAME_END();
- }
-
- FC_RETURN_BOOL(ret);
-}
-FCIMPLEND
-
-/*
- * SystemNative::GetOSVersionEx - Fcall implementation for System.Environment.GetVersionEx
- * Similar as above except this takes OSVERSIONINFOEX structure as input
- */
-
-FCIMPL1(FC_BOOL_RET, SystemNative::GetOSVersionEx, OSVERSIONINFOEXObject *osVer)
-{
- FCALL_CONTRACT;
-
- OSVERSIONINFOEX ver;
- ver.dwOSVersionInfoSize = osVer->dwOSVersionInfoSize;
-
- BOOL ret = GetOSVersionForEnvironment((OSVERSIONINFO *)&ver);
-
- if(ret)
- {
- osVer->dwMajorVersion = ver.dwMajorVersion;
- osVer->dwMinorVersion = ver.dwMinorVersion;
- osVer->dwBuildNumber = ver.dwBuildNumber;
- osVer->dwPlatformId = ver.dwPlatformId;
- osVer->wServicePackMajor = ver.wServicePackMajor;
- osVer->wServicePackMinor = ver.wServicePackMinor;
- osVer->wSuiteMask = ver.wSuiteMask;
- osVer->wProductType = ver.wProductType;
- osVer->wReserved = ver.wReserved;
-
- HELPER_METHOD_FRAME_BEGIN_RET_1(osVer);
- SetObjectReference((OBJECTREF*)&(osVer->szCSDVersion), StringObject::NewString(ver.szCSDVersion), GetAppDomain());
- HELPER_METHOD_FRAME_END();
- }
-
- FC_RETURN_BOOL(ret);
-}
-FCIMPLEND
diff --git a/src/classlibnative/bcltype/system.h b/src/classlibnative/bcltype/system.h
index 1da105841f..986c55b31e 100644
--- a/src/classlibnative/bcltype/system.h
+++ b/src/classlibnative/bcltype/system.h
@@ -74,9 +74,6 @@ public:
static FCDECL0(INT64, __GetSystemTimeAsFileTime);
static FCDECL0(UINT32, GetCurrentProcessorNumber);
static FCDECL0(UINT32, GetTickCount);
- static FCDECL1(FC_BOOL_RET, GetOSVersion, OSVERSIONINFOObject *osVer);
- static FCDECL1(FC_BOOL_RET, GetOSVersionEx, OSVERSIONINFOEXObject *osVer);
-
static
void QCALLTYPE Exit(INT32 exitcode);