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
2c47b66b
Commit
2c47b66b
authored
Oct 20, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieframe: ieframe variant of IEWinMain is Unicode.
parent
26f3c14d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
18 deletions
+32
-18
iexplore.c
dlls/ieframe/iexplore.c
+12
-11
shdocvw_main.c
dlls/shdocvw/shdocvw_main.c
+13
-2
Makefile.in
programs/iexplore/Makefile.in
+1
-1
main.c
programs/iexplore/main.c
+6
-4
No files found.
dlls/ieframe/iexplore.c
View file @
2c47b66b
...
@@ -826,7 +826,7 @@ void released_obj(void)
...
@@ -826,7 +826,7 @@ void released_obj(void)
PostQuitMessage
(
0
);
PostQuitMessage
(
0
);
}
}
static
BOOL
create_ie_window
(
LPCSTR
cmdline
)
static
BOOL
create_ie_window
(
const
WCHAR
*
cmdline
)
{
{
InternetExplorer
*
ie
;
InternetExplorer
*
ie
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -842,25 +842,24 @@ static BOOL create_ie_window(LPCSTR cmdline)
...
@@ -842,25 +842,24 @@ static BOOL create_ie_window(LPCSTR cmdline)
IWebBrowser2_GoHome
(
&
ie
->
IWebBrowser2_iface
);
IWebBrowser2_GoHome
(
&
ie
->
IWebBrowser2_iface
);
}
else
{
}
else
{
VARIANT
var_url
;
VARIANT
var_url
;
DWORD
len
;
int
cmdlen
;
int
cmdlen
;
static
const
WCHAR
nohomeW
[]
=
{
'-'
,
'n'
,
'o'
,
'h'
,
'o'
,
'm'
,
'e'
};
while
(
*
cmdline
==
' '
||
*
cmdline
==
'\t'
)
while
(
*
cmdline
==
' '
||
*
cmdline
==
'\t'
)
cmdline
++
;
cmdline
++
;
cmdlen
=
lstrlenA
(
cmdline
);
cmdlen
=
strlenW
(
cmdline
);
if
(
cmdlen
>
2
&&
cmdline
[
0
]
==
'"'
&&
cmdline
[
cmdlen
-
1
]
==
'"'
)
{
if
(
cmdlen
>
2
&&
cmdline
[
0
]
==
'"'
&&
cmdline
[
cmdlen
-
1
]
==
'"'
)
{
cmdline
++
;
cmdline
++
;
cmdlen
-=
2
;
cmdlen
-=
2
;
}
}
if
(
cmdlen
==
7
&&
!
memcmp
(
cmdline
,
"-nohome"
,
7
))
{
if
(
cmdlen
==
sizeof
(
nohomeW
)
/
sizeof
(
*
nohomeW
)
&&
!
memcmp
(
cmdline
,
nohomeW
,
sizeof
(
nohomeW
)
))
{
ie
->
nohome
=
TRUE
;
ie
->
nohome
=
TRUE
;
}
else
{
}
else
{
V_VT
(
&
var_url
)
=
VT_BSTR
;
V_VT
(
&
var_url
)
=
VT_BSTR
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
cmdline
,
cmdlen
,
NULL
,
0
);
V_BSTR
(
&
var_url
)
=
SysAllocStringLen
(
cmdline
,
cmdlen
);
V_BSTR
(
&
var_url
)
=
SysAllocStringLen
(
NULL
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
cmdline
,
cmdlen
,
V_BSTR
(
&
var_url
),
len
);
/* navigate to the first page */
/* navigate to the first page */
IWebBrowser2_Navigate2
(
&
ie
->
IWebBrowser2_iface
,
&
var_url
,
NULL
,
NULL
,
NULL
,
NULL
);
IWebBrowser2_Navigate2
(
&
ie
->
IWebBrowser2_iface
,
&
var_url
,
NULL
,
NULL
,
NULL
,
NULL
);
...
@@ -1020,12 +1019,14 @@ static void release_dde(void)
...
@@ -1020,12 +1019,14 @@ static void release_dde(void)
*
*
* Only returns on error.
* Only returns on error.
*/
*/
DWORD
WINAPI
IEWinMain
(
const
char
*
szCommandL
ine
,
int
nShowWindow
)
DWORD
WINAPI
IEWinMain
(
const
WCHAR
*
cmdl
ine
,
int
nShowWindow
)
{
{
MSG
msg
;
MSG
msg
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"%s %d
\n
"
,
debugstr_a
(
szCommandLine
),
nShowWindow
);
static
const
WCHAR
embeddingW
[]
=
{
'-'
,
'e'
,
'm'
,
'b'
,
'e'
,
'd'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
TRACE
(
"%s %d
\n
"
,
debugstr_w
(
cmdline
),
nShowWindow
);
CoInitialize
(
NULL
);
CoInitialize
(
NULL
);
...
@@ -1037,8 +1038,8 @@ DWORD WINAPI IEWinMain(const char *szCommandLine, int nShowWindow)
...
@@ -1037,8 +1038,8 @@ DWORD WINAPI IEWinMain(const char *szCommandLine, int nShowWindow)
init_dde
();
init_dde
();
if
(
strc
asecmp
(
szCommandLine
,
"-embedding"
))
{
if
(
strc
mpiW
(
cmdline
,
embeddingW
))
{
if
(
!
create_ie_window
(
szCommandL
ine
))
{
if
(
!
create_ie_window
(
cmdl
ine
))
{
CoUninitialize
();
CoUninitialize
();
ExitProcess
(
1
);
ExitProcess
(
1
);
}
}
...
...
dlls/shdocvw/shdocvw_main.c
View file @
2c47b66b
...
@@ -117,7 +117,9 @@ HRESULT WINAPI DllUnregisterServer(void)
...
@@ -117,7 +117,9 @@ HRESULT WINAPI DllUnregisterServer(void)
*/
*/
DWORD
WINAPI
IEWinMain
(
LPSTR
szCommandLine
,
int
nShowWindow
)
DWORD
WINAPI
IEWinMain
(
LPSTR
szCommandLine
,
int
nShowWindow
)
{
{
DWORD
(
WINAPI
*
pIEWinMain
)(
LPSTR
,
int
);
DWORD
(
WINAPI
*
pIEWinMain
)(
const
WCHAR
*
,
int
);
WCHAR
*
cmdline
;
DWORD
ret
,
len
;
TRACE
(
"%s %d
\n
"
,
debugstr_a
(
szCommandLine
),
nShowWindow
);
TRACE
(
"%s %d
\n
"
,
debugstr_a
(
szCommandLine
),
nShowWindow
);
...
@@ -125,7 +127,16 @@ DWORD WINAPI IEWinMain(LPSTR szCommandLine, int nShowWindow)
...
@@ -125,7 +127,16 @@ DWORD WINAPI IEWinMain(LPSTR szCommandLine, int nShowWindow)
if
(
!
pIEWinMain
)
if
(
!
pIEWinMain
)
ExitProcess
(
1
);
ExitProcess
(
1
);
return
pIEWinMain
(
szCommandLine
,
nShowWindow
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szCommandLine
,
-
1
,
NULL
,
0
);
cmdline
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
!
cmdline
)
ExitProcess
(
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
szCommandLine
,
-
1
,
cmdline
,
len
);
ret
=
pIEWinMain
(
cmdline
,
nShowWindow
);
heap_free
(
cmdline
);
return
ret
;
}
}
/*************************************************************************
/*************************************************************************
...
...
programs/iexplore/Makefile.in
View file @
2c47b66b
EXTRADEFS
=
-DWINE_NO_UNICODE_MACROS
EXTRADEFS
=
-DWINE_NO_UNICODE_MACROS
MODULE
=
iexplore.exe
MODULE
=
iexplore.exe
APPMODE
=
-mwindows
APPMODE
=
-mwindows
-municode
IMPORTS
=
ieframe
IMPORTS
=
ieframe
DELAYIMPORTS
=
advpack version
DELAYIMPORTS
=
advpack version
...
...
programs/iexplore/main.c
View file @
2c47b66b
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#include "wine/unicode.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/debug.h"
extern
DWORD
WINAPI
IEWinMain
(
LPSTR
,
int
);
extern
DWORD
WINAPI
IEWinMain
(
const
WCHAR
*
,
int
);
static
BOOL
check_native_ie
(
void
)
static
BOOL
check_native_ie
(
void
)
{
{
...
@@ -68,13 +68,15 @@ static DWORD register_iexplore(BOOL doregister)
...
@@ -68,13 +68,15 @@ static DWORD register_iexplore(BOOL doregister)
return
FAILED
(
hres
);
return
FAILED
(
hres
);
}
}
int
WINAPI
WinMain
(
HINSTANCE
hInstance
,
HINSTANCE
prev
,
LPSTR
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
(
!
strc
asecmp
(
cmdline
+
1
,
"regserver"
))
if
(
!
strc
mpiW
(
cmdline
+
1
,
regserverW
))
return
register_iexplore
(
TRUE
);
return
register_iexplore
(
TRUE
);
if
(
!
strc
asecmp
(
cmdline
+
1
,
"unregserver"
))
if
(
!
strc
mpiW
(
cmdline
+
1
,
unregserverW
))
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