Akihiro Sagawa : iexplore: Follow translation version info to detect native IE.
Alexandre Julliard
julliard at winehq.org
Mon Mar 6 15:25:08 CST 2017
Module: wine
Branch: master
Commit: 79d01be4361dcd999ca393239dc55849f2d235c8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=79d01be4361dcd999ca393239dc55849f2d235c8
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Mon Mar 6 23:49:41 2017 +0900
iexplore: Follow translation version info to detect native IE.
Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/iexplore/Makefile.in | 2 +-
programs/iexplore/main.c | 18 +++++++++++++-----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/programs/iexplore/Makefile.in b/programs/iexplore/Makefile.in
index f3fd4c2..7e74867 100644
--- a/programs/iexplore/Makefile.in
+++ b/programs/iexplore/Makefile.in
@@ -1,7 +1,7 @@
MODULE = iexplore.exe
APPMODE = -mwindows -municode -Wl,--large-address-aware
IMPORTS = ieframe
-DELAYIMPORTS = advpack version
+DELAYIMPORTS = advpack version user32
C_SRCS = \
main.c
diff --git a/programs/iexplore/main.c b/programs/iexplore/main.c
index 73fec25..b881443 100644
--- a/programs/iexplore/main.c
+++ b/programs/iexplore/main.c
@@ -34,14 +34,19 @@ static BOOL check_native_ie(void)
LPWSTR file_desc;
UINT bytes;
void* buf;
- BOOL ret;
+ BOOL ret = TRUE;
+ LPWORD translation;
static const WCHAR browseui_dllW[] = {'b','r','o','w','s','e','u','i','.','d','l','l',0};
static const WCHAR wineW[] = {'W','i','n','e',0};
- static const WCHAR file_desc_strW[] =
+ static const WCHAR translationW[] =
+ {'\\','V','a','r','F','i','l','e','I','n','f','o',
+ '\\','T','r','a','n','s','l','a','t','i','o','n',0};
+ static const WCHAR file_desc_fmtW[] =
{'\\','S','t','r','i','n','g','F','i','l','e','I','n','f','o',
- '\\','0','4','0','9','0','4','e','4',
+ '\\','%','0','4','x','%','0','4','x',
'\\','F','i','l','e','D','e','s','c','r','i','p','t','i','o','n',0};
+ WCHAR file_desc_strW[48];
size = GetFileVersionInfoSizeW(browseui_dllW, &handle);
if(!size)
@@ -49,8 +54,11 @@ static BOOL check_native_ie(void)
buf = HeapAlloc(GetProcessHeap(), 0, size);
GetFileVersionInfoW(browseui_dllW, 0, size,buf);
-
- ret = !VerQueryValueW(buf, file_desc_strW, (void**)&file_desc, &bytes) || !strstrW(file_desc, wineW);
+ if (VerQueryValueW(buf, translationW, (void **)&translation, &bytes))
+ {
+ wsprintfW(file_desc_strW, file_desc_fmtW, translation[0], translation[1]);
+ ret = !VerQueryValueW(buf, file_desc_strW, (void**)&file_desc, &bytes) || !strstrW(file_desc, wineW);
+ }
HeapFree(GetProcessHeap(), 0, buf);
return ret;
More information about the wine-cvs
mailing list