Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shdocvw/shdocvw.spec | 2 +- dlls/shdocvw/shdocvw_main.c | 11 ----------- include/shlwapi.h | 8 +++++++- 3 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/dlls/shdocvw/shdocvw.spec b/dlls/shdocvw/shdocvw.spec index 485d1608db..aa1b5e0c96 100644 --- a/dlls/shdocvw/shdocvw.spec +++ b/dlls/shdocvw/shdocvw.spec @@ -2,7 +2,7 @@ 101 stdcall -noname IEWinMain(str long) 102 stub -noname CreateShortcutInDirA 103 stub -noname CreateShortcutInDirW -104 stdcall -noname WhichPlatformFORWARD() +104 stdcall -noname WhichPlatform() shlwapi.WhichPlatform 105 stub -noname CreateShortcutInDirEx 106 stub HlinkFindFrame 107 stub SetShellOfflineState diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c index 98d0d2cde2..ac3913dd23 100644 --- a/dlls/shdocvw/shdocvw_main.c +++ b/dlls/shdocvw/shdocvw_main.c @@ -283,17 +283,6 @@ static void* fetch_shlwapi_ordinal(UINT_PTR ord) return (void*)GetProcAddress(h, (const char*)ord); }
-/****************************************************************** - * WhichPlatformFORWARD (SHDOCVW.@) - */ -DWORD WINAPI WhichPlatformFORWARD(void) -{ - static DWORD (WINAPI *p)(void); - - if (p || (p = fetch_shlwapi_ordinal(276))) return p(); - return 1; /* not integrated, see shlwapi.WhichPlatform */ -} - /****************************************************************** * StopWatchModeFORWARD (SHDOCVW.@) */ diff --git a/include/shlwapi.h b/include/shlwapi.h index 8d6801a94d..2bfca0bc90 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -1135,7 +1135,6 @@ BOOL WINAPI IsOS(DWORD); #define FDTF_RTLDATE 0x00000200 #define FDTF_NOAUTOREADINGORDER 0x00000400
- typedef struct { const IID *piid; @@ -1144,6 +1143,13 @@ typedef struct
HRESULT WINAPI QISearch(void* base, const QITAB *pqit, REFIID riid, void **ppv);
+#define PLATFORM_UNKNOWN 0 +#define PLATFORM_IE3 1 +#define PLATFORM_BROWSERONLY 1 +#define PLATFORM_INTEGRATED 2 + +UINT WINAPI WhichPlatform(void); + #include <poppack.h>
#ifdef __cplusplus
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/ordinal.c | 66 ------------------------------------- dlls/shlwapi/shlwapi_main.c | 48 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 66 deletions(-)
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index c5c4fa14ad..dd39366c80 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -2291,72 +2291,6 @@ BOOL WINAPI GUIDFromStringW(LPCWSTR idstr, CLSID *id) return SUCCEEDED(CLSIDFromString((LPCOLESTR)idstr, id)); }
-/************************************************************************* - * @ [SHLWAPI.276] - * - * Determine if the browser is integrated into the shell, and set a registry - * key accordingly. - * - * PARAMS - * None. - * - * RETURNS - * 1, If the browser is not integrated. - * 2, If the browser is integrated. - * - * NOTES - * The key "HKLM\Software\Microsoft\Internet Explorer\IntegratedBrowser" is - * either set to TRUE, or removed depending on whether the browser is deemed - * to be integrated. - */ -DWORD WINAPI WhichPlatform(void) -{ - static const char szIntegratedBrowser[] = "IntegratedBrowser"; - static DWORD dwState = 0; - HKEY hKey; - DWORD dwRet, dwData, dwSize; - HMODULE hshell32; - - if (dwState) - return dwState; - - /* If shell32 exports DllGetVersion(), the browser is integrated */ - dwState = 1; - hshell32 = LoadLibraryA("shell32.dll"); - if (hshell32) - { - FARPROC pDllGetVersion; - pDllGetVersion = GetProcAddress(hshell32, "DllGetVersion"); - dwState = pDllGetVersion ? 2 : 1; - FreeLibrary(hshell32); - } - - /* Set or delete the key accordingly */ - dwRet = RegOpenKeyExA(HKEY_LOCAL_MACHINE, - "Software\Microsoft\Internet Explorer", 0, - KEY_ALL_ACCESS, &hKey); - if (!dwRet) - { - dwRet = RegQueryValueExA(hKey, szIntegratedBrowser, 0, 0, - (LPBYTE)&dwData, &dwSize); - - if (!dwRet && dwState == 1) - { - /* Value exists but browser is not integrated */ - RegDeleteValueA(hKey, szIntegratedBrowser); - } - else if (dwRet && dwState == 2) - { - /* Browser is integrated but value does not exist */ - dwData = TRUE; - RegSetValueExA(hKey, szIntegratedBrowser, 0, REG_DWORD, - (LPBYTE)&dwData, sizeof(dwData)); - } - RegCloseKey(hKey); - } - return dwState; -} - /************************************************************************* * @ [SHLWAPI.278] * diff --git a/dlls/shlwapi/shlwapi_main.c b/dlls/shlwapi/shlwapi_main.c index fc1b6d6137..af79c33cb6 100644 --- a/dlls/shlwapi/shlwapi_main.c +++ b/dlls/shlwapi/shlwapi_main.c @@ -108,3 +108,51 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi) WARN("pdvi->cbSize = %d, unhandled\n", pdvi2->info1.cbSize); return E_INVALIDARG; } + +/************************************************************************* + * WhichPlatform() [SHLWAPI.276] + */ +UINT WINAPI WhichPlatform(void) +{ + static const char szIntegratedBrowser[] = "IntegratedBrowser"; + static DWORD state = PLATFORM_UNKNOWN; + DWORD ret, data, size; + HMODULE hshell32; + HKEY hKey; + + if (state) + return state; + + /* If shell32 exports DllGetVersion(), the browser is integrated */ + state = PLATFORM_BROWSERONLY; + hshell32 = LoadLibraryA("shell32.dll"); + if (hshell32) + { + FARPROC pDllGetVersion; + pDllGetVersion = GetProcAddress(hshell32, "DllGetVersion"); + state = pDllGetVersion ? PLATFORM_INTEGRATED : PLATFORM_BROWSERONLY; + FreeLibrary(hshell32); + } + + /* Set or delete the key accordingly */ + ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\Microsoft\Internet Explorer", 0, KEY_ALL_ACCESS, &hKey); + if (!ret) + { + size = sizeof(data); + ret = RegQueryValueExA(hKey, szIntegratedBrowser, 0, 0, (BYTE *)&data, &size); + if (!ret && state == PLATFORM_BROWSERONLY) + { + /* Value exists but browser is not integrated */ + RegDeleteValueA(hKey, szIntegratedBrowser); + } + else if (ret && state == PLATFORM_INTEGRATED) + { + /* Browser is integrated but value does not exist */ + data = TRUE; + RegSetValueExA(hKey, szIntegratedBrowser, 0, REG_DWORD, (BYTE *)&data, sizeof(data)); + } + RegCloseKey(hKey); + } + + return state; +}
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/ordinal.c | 27 --------------------------- dlls/shlwapi/shlwapi_main.c | 10 ++++++++++ include/shlwapi.h | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 27 deletions(-)
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index dd39366c80..8767d0b579 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -4284,33 +4284,6 @@ HRESULT WINAPI SHCreatePropertyBagOnRegKey (HKEY hKey, LPCWSTR subkey, return E_NOTIMPL; }
-/*********************************************************************** - * SHGetViewStatePropertyBag [SHLWAPI.515] - * - * Retrieves a property bag in which the view state information of a folder - * can be stored. - * - * PARAMS - * pidl [I] PIDL of the folder requested - * bag_name [I] Name of the property bag requested - * flags [I] Optional flags - * riid [I] IID of requested property bag interface - * ppv [O] Address to receive pointer to the new interface - * - * RETURNS - * success: S_OK - * failure: error code - * - */ -HRESULT WINAPI SHGetViewStatePropertyBag(LPCITEMIDLIST pidl, LPWSTR bag_name, - DWORD flags, REFIID riid, void **ppv) -{ - FIXME("%p %s %d %s %p STUB\n", pidl, debugstr_w(bag_name), flags, - debugstr_guid(riid), ppv); - - return E_NOTIMPL; -} - /*********************************************************************** * SHFormatDateTimeW [SHLWAPI.354] * diff --git a/dlls/shlwapi/shlwapi_main.c b/dlls/shlwapi/shlwapi_main.c index af79c33cb6..3717dfa712 100644 --- a/dlls/shlwapi/shlwapi_main.c +++ b/dlls/shlwapi/shlwapi_main.c @@ -156,3 +156,13 @@ UINT WINAPI WhichPlatform(void)
return state; } + +/*********************************************************************** + * SHGetViewStatePropertyBag [SHLWAPI.515] + */ +HRESULT WINAPI SHGetViewStatePropertyBag(PCIDLIST_ABSOLUTE pidl, PCWSTR bag_name, DWORD flags, REFIID riid, void **ppv) +{ + FIXME("%p, %s, %#x, %s, %p stub.\n", pidl, debugstr_w(bag_name), flags, debugstr_guid(riid), ppv); + + return E_NOTIMPL; +} diff --git a/include/shlwapi.h b/include/shlwapi.h index 2bfca0bc90..4fd47d249f 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -1150,6 +1150,20 @@ HRESULT WINAPI QISearch(void* base, const QITAB *pqit, REFIID riid, void **ppv);
UINT WINAPI WhichPlatform(void);
+#define SHGVSPB_PERUSER 0x00000001 +#define SHGVSPB_ALLUSERS 0x00000002 +#define SHGVSPB_PERFOLDER 0x00000004 +#define SHGVSPB_ALLFOLDERS 0x00000008 +#define SHGVSPB_INHERIT 0x00000010 +#define SHGVSPB_ROAM 0x00000020 +#define SHGVSPB_NOAUTODEFAULTS 0x80000000 +#define SHGVSPB_FOLDER (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER) +#define SHGVSPB_FOLDERNODEFAULTS (SHGVSPB_PERUSER | SHGVSPB_PERFOLDER | SHGVSPB_NOAUTODEFAULTS) +#define SHGVSPB_USERDEFAULTS (SHGVSPB_PERUSER | SHGVSPB_ALLFOLDERS) +#define SHGVSPB_GLOBALDEFAULTS (SHGVSPB_ALLUSERS | SHGVSPB_ALLFOLDERS) + +HRESULT WINAPI SHGetViewStatePropertyBag(PCIDLIST_ABSOLUTE pidl, PCWSTR bagname, DWORD flags, REFIID riid, void **ppv); + #include <poppack.h>
#ifdef __cplusplus
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/shlwapi.spec | 4 ++-- include/shlwapi.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 9b4b6357c6..f47f41aea4 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -350,8 +350,8 @@ 350 stdcall -noname GetFileVersionInfoSizeWrapW(wstr ptr) 351 stdcall -noname GetFileVersionInfoWrapW(wstr long long ptr) 352 stdcall -noname VerQueryValueWrapW(ptr wstr ptr ptr) -353 stdcall -ordinal SHFormatDateTimeA(ptr ptr str long) -354 stdcall -ordinal SHFormatDateTimeW(ptr ptr wstr long) +353 stdcall -ordinal SHFormatDateTimeA(ptr ptr ptr long) +354 stdcall -ordinal SHFormatDateTimeW(ptr ptr ptr long) 355 stdcall -noname IUnknown_EnableModeless(ptr long) 356 stdcall -noname CreateAllAccessSecurityAttributes(ptr ptr long) 357 stdcall -noname SHGetNewLinkInfoWrapW(wstr wstr wstr long long) diff --git a/include/shlwapi.h b/include/shlwapi.h index 4fd47d249f..02517a944a 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -1135,6 +1135,9 @@ BOOL WINAPI IsOS(DWORD); #define FDTF_RTLDATE 0x00000200 #define FDTF_NOAUTOREADINGORDER 0x00000400
+int WINAPI SHFormatDateTimeA(const FILETIME UNALIGNED *filetime, DWORD *flags, LPSTR buffer, UINT size); +int WINAPI SHFormatDateTimeW(const FILETIME UNALIGNED *filetime, DWORD *flags, LPWSTR buffer, UINT size); + typedef struct { const IID *piid;
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shlwapi/ordinal.c | 18 ------------------ dlls/shlwapi/shlwapi_main.c | 10 ++++++++++ include/shlwapi.h | 4 ++++ 3 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 8767d0b579..8c9e324ae0 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -3564,24 +3564,6 @@ HRESULT WINAPI SHGetInverseCMAP(LPDWORD dest, DWORD dwSize) return 0; }
-/************************************************************************* - * SHIsLowMemoryMachine [SHLWAPI.@] - * - * Determine if the current computer has low memory. - * - * PARAMS - * x [I] FIXME - * - * RETURNS - * TRUE if the users machine has 16 Megabytes of memory or less, - * FALSE otherwise. - */ -BOOL WINAPI SHIsLowMemoryMachine (DWORD x) -{ - FIXME("(0x%08x) stub\n", x); - return FALSE; -} - /************************************************************************* * GetMenuPosFromID [SHLWAPI.@] * diff --git a/dlls/shlwapi/shlwapi_main.c b/dlls/shlwapi/shlwapi_main.c index 3717dfa712..04abf30ffc 100644 --- a/dlls/shlwapi/shlwapi_main.c +++ b/dlls/shlwapi/shlwapi_main.c @@ -166,3 +166,13 @@ HRESULT WINAPI SHGetViewStatePropertyBag(PCIDLIST_ABSOLUTE pidl, PCWSTR bag_name
return E_NOTIMPL; } + +/************************************************************************* + * SHIsLowMemoryMachine [SHLWAPI.@] + */ +BOOL WINAPI SHIsLowMemoryMachine(DWORD type) +{ + FIXME("%d stub\n", type); + + return FALSE; +} diff --git a/include/shlwapi.h b/include/shlwapi.h index 02517a944a..ca15bd2077 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -1167,6 +1167,10 @@ UINT WINAPI WhichPlatform(void);
HRESULT WINAPI SHGetViewStatePropertyBag(PCIDLIST_ABSOLUTE pidl, PCWSTR bagname, DWORD flags, REFIID riid, void **ppv);
+#define ILMM_IE4 0 + +BOOL WINAPI SHIsLowMemoryMachine(DWORD type); + #include <poppack.h>
#ifdef __cplusplus