mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 03:08:19 +00:00
shlwapi: Forward IsOS() to shcore.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3e3ed6f431
commit
47b976e693
|
@ -3805,137 +3805,6 @@ HRESULT WINAPI CLSIDFromStringWrap(LPCWSTR idstr, CLSID *id)
|
|||
return CLSIDFromString((LPCOLESTR)idstr, 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]
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue