From ec33091a1d4eb1649067ab74f152e8c21680d6f0 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 26 Jan 2019 13:08:54 +0100 Subject: [PATCH] [IEFRAME] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/ieframe/iexplore.c | 22 +++++++++++----------- dll/win32/ieframe/intshcut.c | 24 ++++++++++++------------ media/doc/README.WINE | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dll/win32/ieframe/iexplore.c b/dll/win32/ieframe/iexplore.c index 477d58fce62..1a444b8406a 100644 --- a/dll/win32/ieframe/iexplore.c +++ b/dll/win32/ieframe/iexplore.c @@ -170,8 +170,8 @@ static void add_fav_to_menu(HMENU favmenu, HMENU menu, LPWSTR title, LPCWSTR url static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) { + static const WCHAR search[] = {'*',0}; WCHAR path[MAX_PATH*2]; - const WCHAR search[] = {'*',0}; WCHAR* filename; HANDLE findhandle; WIN32_FIND_DATAW finddata; @@ -202,9 +202,9 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) if(finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + static const WCHAR ignore1[] = {'.','.',0}; + static const WCHAR ignore2[] = {'.',0}; MENUITEMINFOW item; - const WCHAR ignore1[] = {'.','.',0}; - const WCHAR ignore2[] = {'.',0}; if(!lstrcmpW(filename, ignore1) || !lstrcmpW(filename, ignore2)) continue; @@ -217,9 +217,9 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) add_favs_to_menu(favmenu, item.hSubMenu, path); } else { + static const WCHAR urlext[] = {'.','u','r','l',0}; WCHAR* fileext; WCHAR* url = NULL; - const WCHAR urlext[] = {'.','u','r','l',0}; if(lstrcmpiW(PathFindExtensionW(filename), urlext)) continue; @@ -250,18 +250,18 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) static void add_tbs_to_menu(HMENU menu) { + static const WCHAR toolbar_key[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'I','n','t','e','r','n','e','t',' ', + 'E','x','p','l','o','r','e','r','\\', + 'T','o','o','l','b','a','r',0}; HUSKEY toolbar_handle; - WCHAR toolbar_key[] = {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'I','n','t','e','r','n','e','t',' ', - 'E','x','p','l','o','r','e','r','\\', - 'T','o','o','l','b','a','r',0}; if(SHRegOpenUSKeyW(toolbar_key, KEY_READ, NULL, &toolbar_handle, TRUE) == ERROR_SUCCESS) { + static const WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\\', + 'C','l','a','s','s','e','s','\\','C','L','S','I','D',0}; HUSKEY classes_handle; - WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\\', - 'C','l','a','s','s','e','s','\\','C','L','S','I','D',0}; WCHAR guid[39]; DWORD value_len = ARRAY_SIZE(guid); int i; diff --git a/dll/win32/ieframe/intshcut.c b/dll/win32/ieframe/intshcut.c index 4331bb9b0a7..8bf8ae87029 100644 --- a/dll/win32/ieframe/intshcut.c +++ b/dll/win32/ieframe/intshcut.c @@ -456,11 +456,11 @@ static HRESULT get_profile_string(LPCWSTR lpAppName, LPCWSTR lpKeyName, static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileName, DWORD dwMode) { + static const WCHAR str_header[] = {'I','n','t','e','r','n','e','t','S','h','o','r','t','c','u','t',0}; + static const WCHAR str_URL[] = {'U','R','L',0}; + static const WCHAR str_iconfile[] = {'i','c','o','n','f','i','l','e',0}; + static const WCHAR str_iconindex[] = {'i','c','o','n','i','n','d','e','x',0}; InternetShortcut *This = impl_from_IPersistFile(pFile); - static WCHAR str_header[] = {'I','n','t','e','r','n','e','t','S','h','o','r','t','c','u','t',0}; - static WCHAR str_URL[] = {'U','R','L',0}; - static WCHAR str_iconfile[] = {'i','c','o','n','f','i','l','e',0}; - static WCHAR str_iconindex[] = {'i','c','o','n','i','n','d','e','x',0}; WCHAR *filename = NULL; WCHAR *url; HRESULT hr; @@ -573,12 +573,12 @@ static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileNam file = CreateFileW(pszFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (file != INVALID_HANDLE_VALUE) { + static const char str_header[] = "[InternetShortcut]"; + static const char str_URL[] = "URL="; + static const char str_ICONFILE[] = "ICONFILE="; + static const char str_eol[] = "\r\n"; DWORD bytesWritten; char *iconfile; - char str_header[] = "[InternetShortcut]"; - char str_URL[] = "URL="; - char str_ICONFILE[] = "ICONFILE="; - char str_eol[] = "\r\n"; IPropertyStorage *pPropStgRead; PROPSPEC ps[2]; PROPVARIANT pvread[2]; @@ -587,11 +587,11 @@ static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileNam ps[1].ulKind = PRSPEC_PROPID; ps[1].u.propid = PID_IS_ICONINDEX; - WriteFile(file, str_header, lstrlenA(str_header), &bytesWritten, NULL); - WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL); - WriteFile(file, str_URL, lstrlenA(str_URL), &bytesWritten, NULL); + WriteFile(file, str_header, ARRAY_SIZE(str_header) - 1, &bytesWritten, NULL); + WriteFile(file, str_eol, ARRAY_SIZE(str_eol) - 1, &bytesWritten, NULL); + WriteFile(file, str_URL, ARRAY_SIZE(str_URL) - 1, &bytesWritten, NULL); WriteFile(file, url, lstrlenA(url), &bytesWritten, NULL); - WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL); + WriteFile(file, str_eol, ARRAY_SIZE(str_eol) - 1, &bytesWritten, NULL); hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut, STGM_READ|STGM_SHARE_EXCLUSIVE, &pPropStgRead); if (SUCCEEDED(hr)) diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 1a8529a1249..134e3b16f0f 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -74,7 +74,7 @@ reactos/dll/win32/hlink # Synced to WineStaging-4.0 reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9 reactos/dll/win32/httpapi # Synced to WineStaging-3.3 reactos/dll/win32/iccvid # Synced to WineStaging-4.0 -reactos/dll/win32/ieframe # Synced to WineStaging-3.17 +reactos/dll/win32/ieframe # Synced to WineStaging-4.0 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-3.17 reactos/dll/win32/imagehlp # Synced to WineStaging-3.3 reactos/dll/win32/imm32 # Synced to WineStaging-3.17