Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
845d04a8
Commit
845d04a8
authored
Oct 12, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iexplore: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f586348d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
20 deletions
+7
-20
main.c
programs/iexplore/main.c
+7
-20
No files found.
programs/iexplore/main.c
View file @
845d04a8
...
@@ -35,28 +35,18 @@ static BOOL check_native_ie(void)
...
@@ -35,28 +35,18 @@ static BOOL check_native_ie(void)
void
*
buf
;
void
*
buf
;
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
LPWORD
translation
;
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
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'
,
'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
];
WCHAR
file_desc_strW
[
48
];
size
=
GetFileVersionInfoSizeW
(
browseui_dllW
,
&
handle
);
size
=
GetFileVersionInfoSizeW
(
L"browseui.dll"
,
&
handle
);
if
(
!
size
)
if
(
!
size
)
return
TRUE
;
return
TRUE
;
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
GetFileVersionInfoW
(
browseui_dllW
,
0
,
size
,
buf
);
GetFileVersionInfoW
(
L"browseui.dll"
,
0
,
size
,
buf
);
if
(
VerQueryValueW
(
buf
,
translationW
,
(
void
**
)
&
translation
,
&
bytes
))
if
(
VerQueryValueW
(
buf
,
L"
\\
VarFileInfo
\\
Translation"
,
(
void
**
)
&
translation
,
&
bytes
))
{
{
wsprintfW
(
file_desc_strW
,
file_desc_fmtW
,
translation
[
0
],
translation
[
1
]);
wsprintfW
(
file_desc_strW
,
L"
\\
StringFileInfo
\\
%04x%04x
\\
FileDescription"
,
translation
[
0
],
translation
[
1
]);
ret
=
!
VerQueryValueW
(
buf
,
file_desc_strW
,
(
void
**
)
&
file_desc
,
&
bytes
)
||
!
wcsstr
(
file_desc
,
wineW
);
ret
=
!
VerQueryValueW
(
buf
,
file_desc_strW
,
(
void
**
)
&
file_desc
,
&
bytes
)
||
!
wcsstr
(
file_desc
,
L"Wine"
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
...
@@ -78,13 +68,10 @@ static DWORD register_iexplore(BOOL doregister)
...
@@ -78,13 +68,10 @@ static DWORD register_iexplore(BOOL doregister)
int
WINAPI
wWinMain
(
HINSTANCE
hInstance
,
HINSTANCE
prev
,
WCHAR
*
cmdline
,
int
show
)
int
WINAPI
wWinMain
(
HINSTANCE
hInstance
,
HINSTANCE
prev
,
WCHAR
*
cmdline
,
int
show
)
{
{
static
const
WCHAR
regserverW
[]
=
{
'r'
,
'e'
,
'g'
,
's'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
unregserverW
[]
=
{
'u'
,
'n'
,
'r'
,
'e'
,
'g'
,
's'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
if
(
*
cmdline
==
'-'
||
*
cmdline
==
'/'
)
{
if
(
*
cmdline
==
'-'
||
*
cmdline
==
'/'
)
{
if
(
!
wcsicmp
(
cmdline
+
1
,
regserverW
))
if
(
!
wcsicmp
(
cmdline
+
1
,
L"regserver"
))
return
register_iexplore
(
TRUE
);
return
register_iexplore
(
TRUE
);
if
(
!
wcsicmp
(
cmdline
+
1
,
unregserverW
))
if
(
!
wcsicmp
(
cmdline
+
1
,
L"unregserver"
))
return
register_iexplore
(
FALSE
);
return
register_iexplore
(
FALSE
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment