Commit 47b976e6 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shlwapi: Forward IsOS() to shcore.

parent 3e3ed6f4
......@@ -3806,137 +3806,6 @@ HRESULT WINAPI CLSIDFromStringWrap(LPCWSTR idstr, CLSID *id)
}
/*************************************************************************
* @ [SHLWAPI.437]
*
* Determine if the OS supports a given feature.
*
* PARAMS
* dwFeature [I] Feature requested (undocumented)
*
* RETURNS
* TRUE If the feature is available.
* FALSE If the feature is not available.
*/
BOOL WINAPI IsOS(DWORD feature)
{
OSVERSIONINFOA osvi;
DWORD platform, majorv, minorv;
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
if(!GetVersionExA(&osvi)) {
ERR("GetVersionEx failed\n");
return FALSE;
}
majorv = osvi.dwMajorVersion;
minorv = osvi.dwMinorVersion;
platform = osvi.dwPlatformId;
#define ISOS_RETURN(x) \
TRACE("(0x%x) ret=%d\n",feature,(x)); \
return (x);
switch(feature) {
case OS_WIN32SORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32s
|| platform == VER_PLATFORM_WIN32_WINDOWS)
case OS_NT:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_WIN95ORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS)
case OS_NT4ORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 4)
case OS_WIN2000ORGREATER_ALT:
case OS_WIN2000ORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
case OS_WIN98ORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 10)
case OS_WIN98_GOLD:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 10)
case OS_WIN2000PRO:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
case OS_WIN2000SERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
case OS_WIN2000ADVSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
case OS_WIN2000DATACENTER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
case OS_WIN2000TERMINAL:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && (minorv == 0 || minorv == 1))
case OS_EMBEDDED:
FIXME("(OS_EMBEDDED) What should we return here?\n");
return FALSE;
case OS_TERMINALCLIENT:
FIXME("(OS_TERMINALCLIENT) What should we return here?\n");
return FALSE;
case OS_TERMINALREMOTEADMIN:
FIXME("(OS_TERMINALREMOTEADMIN) What should we return here?\n");
return FALSE;
case OS_WIN95_GOLD:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv == 0)
case OS_MEORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_WINDOWS && minorv >= 90)
case OS_XPORGREATER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
case OS_HOME:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5 && minorv >= 1)
case OS_PROFESSIONAL:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_DATACENTER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_ADVSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 5)
case OS_SERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_TERMINALSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_PERSONALTERMINALSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && minorv >= 1 && majorv >= 5)
case OS_FASTUSERSWITCHING:
FIXME("(OS_FASTUSERSWITCHING) What should we return here?\n");
return TRUE;
case OS_WELCOMELOGONUI:
FIXME("(OS_WELCOMELOGONUI) What should we return here?\n");
return FALSE;
case OS_DOMAINMEMBER:
FIXME("(OS_DOMAINMEMBER) What should we return here?\n");
return TRUE;
case OS_ANYSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_WOW6432:
{
BOOL is_wow64;
IsWow64Process(GetCurrentProcess(), &is_wow64);
return is_wow64;
}
case OS_WEBSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_SMALLBUSINESSSERVER:
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT)
case OS_TABLETPC:
FIXME("(OS_TABLETPC) What should we return here?\n");
return FALSE;
case OS_SERVERADMINUI:
FIXME("(OS_SERVERADMINUI) What should we return here?\n");
return FALSE;
case OS_MEDIACENTER:
FIXME("(OS_MEDIACENTER) What should we return here?\n");
return FALSE;
case OS_APPLIANCE:
FIXME("(OS_APPLIANCE) What should we return here?\n");
return FALSE;
case 0x25: /*OS_VISTAORGREATER*/
ISOS_RETURN(platform == VER_PLATFORM_WIN32_NT && majorv >= 6)
}
#undef ISOS_RETURN
WARN("(0x%x) unknown parameter\n",feature);
return FALSE;
}
/*************************************************************************
* @ [SHLWAPI.439]
*/
HRESULT WINAPI SHLoadRegUIStringW(HKEY hkey, LPCWSTR value, LPWSTR buf, DWORD size)
......
......@@ -434,7 +434,7 @@
434 stdcall -noname SendMessageTimeoutWrapW(long long long long long long ptr) user32.SendMessageTimeoutW
435 stdcall -noname CLSIDFromProgIDWrap(wstr ptr) ole32.CLSIDFromProgID
436 stdcall -noname CLSIDFromStringWrap(wstr ptr)
437 stdcall -ordinal IsOS(long)
437 stdcall -ordinal IsOS(long) shcore.IsOS
438 stub -noname SHLoadRegUIStringA
439 stdcall -noname SHLoadRegUIStringW(ptr wstr ptr long)
440 stdcall -noname SHGetWebFolderFilePathA(str ptr long)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment