Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e02d3627
Commit
e02d3627
authored
May 12, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
May 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Added support for navigation to application URLs.
parent
8bb2513e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
navigate.c
dlls/shdocvw/navigate.c
+39
-0
No files found.
dlls/shdocvw/navigate.c
View file @
e02d3627
...
...
@@ -25,6 +25,8 @@
#include "shdocvw.h"
#include "mshtml.h"
#include "exdispid.h"
#include "shellapi.h"
#include "winreg.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
shdocvw
);
...
...
@@ -378,6 +380,39 @@ static void on_before_navigate2(DocHost *This, LPWSTR url, PBYTE post_data, ULON
SafeArrayDestroy
(
V_ARRAY
(
&
var_post_data
));
}
static
BOOL
try_application_url
(
LPCWSTR
url
)
{
SHELLEXECUTEINFOW
exec_info
;
WCHAR
app
[
64
];
HKEY
hkey
;
DWORD
res
,
type
;
HRESULT
hres
;
static
const
WCHAR
wszURLProtocol
[]
=
{
'U'
,
'R'
,
'L'
,
' '
,
'P'
,
'r'
,
'o'
,
't'
,
'o'
,
'c'
,
'o'
,
'l'
,
0
};
hres
=
CoInternetParseUrl
(
url
,
PARSE_SCHEMA
,
0
,
app
,
sizeof
(
app
)
/
sizeof
(
WCHAR
),
NULL
,
0
);
if
(
FAILED
(
hres
))
return
FALSE
;
res
=
RegOpenKeyW
(
HKEY_CLASSES_ROOT
,
app
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
return
FALSE
;
res
=
RegQueryValueExW
(
hkey
,
wszURLProtocol
,
NULL
,
&
type
,
NULL
,
NULL
);
RegCloseKey
(
hkey
);
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
return
FALSE
;
TRACE
(
"openning application %s
\n
"
,
debugstr_w
(
app
));
memset
(
&
exec_info
,
0
,
sizeof
(
exec_info
));
exec_info
.
cbSize
=
sizeof
(
exec_info
);
exec_info
.
lpFile
=
url
;
exec_info
.
nShow
=
SW_SHOW
;
return
ShellExecuteExW
(
&
exec_info
);
}
static
HRESULT
navigate
(
DocHost
*
This
,
IMoniker
*
mon
,
IBindCtx
*
bindctx
,
IBindStatusCallback
*
callback
)
{
...
...
@@ -520,6 +555,10 @@ HRESULT navigate_hlink(DocHost *This, IMoniker *mon, IBindCtx *bindctx,
return
S_OK
;
}
/* FIXME: We should do it after BindToObject call */
if
(
try_application_url
(
url
))
return
S_OK
;
This
->
url
=
url
;
return
navigate
(
This
,
mon
,
bindctx
,
callback
);
...
...
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