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
44f929fc
Commit
44f929fc
authored
Nov 04, 2010
by
Andrew Bogott
Committed by
Alexandre Julliard
Nov 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Implement UniformResourceLocatorW_InvokeCommand and…
shdocvw: Implement UniformResourceLocatorW_InvokeCommand and UniformResourceLocatorA_InvokeCommand for the default verb.
parent
ce0e1f07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
4 deletions
+63
-4
intshcut.c
dlls/shdocvw/intshcut.c
+63
-4
No files found.
dlls/shdocvw/intshcut.c
View file @
44f929fc
...
...
@@ -32,6 +32,8 @@
#include "objidl.h"
#include "shobjidl.h"
#include "intshcut.h"
#include "shellapi.h"
#include "winreg.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
shdocvw
);
...
...
@@ -237,8 +239,47 @@ static HRESULT WINAPI UniformResourceLocatorW_GetUrl(IUniformResourceLocatorW *u
static
HRESULT
WINAPI
UniformResourceLocatorW_InvokeCommand
(
IUniformResourceLocatorW
*
url
,
PURLINVOKECOMMANDINFOW
pCommandInfo
)
{
FIXME
(
"(%p, %p): stub
\n
"
,
url
,
pCommandInfo
);
return
E_NOTIMPL
;
InternetShortcut
*
This
=
impl_from_IUniformResourceLocatorW
(
url
);
WCHAR
app
[
64
];
HKEY
hkey
;
static
const
WCHAR
wszURLProtocol
[]
=
{
'U'
,
'R'
,
'L'
,
' '
,
'P'
,
'r'
,
'o'
,
't'
,
'o'
,
'c'
,
'o'
,
'l'
,
0
};
SHELLEXECUTEINFOW
sei
;
DWORD
res
,
type
;
HRESULT
hres
;
TRACE
(
"%p %p
\n
"
,
This
,
pCommandInfo
);
if
(
pCommandInfo
->
dwcbSize
<
sizeof
(
URLINVOKECOMMANDINFOW
))
return
E_INVALIDARG
;
if
(
pCommandInfo
->
dwFlags
!=
IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB
)
{
FIXME
(
"(%p, %p): non-default verbs not implemented
\n
"
,
url
,
pCommandInfo
);
return
E_NOTIMPL
;
}
hres
=
CoInternetParseUrl
(
This
->
url
,
PARSE_SCHEMA
,
0
,
app
,
sizeof
(
app
)
/
sizeof
(
WCHAR
),
NULL
,
0
);
if
(
FAILED
(
hres
))
return
E_FAIL
;
res
=
RegOpenKeyW
(
HKEY_CLASSES_ROOT
,
app
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
return
E_FAIL
;
res
=
RegQueryValueExW
(
hkey
,
wszURLProtocol
,
NULL
,
&
type
,
NULL
,
NULL
);
RegCloseKey
(
hkey
);
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
return
E_FAIL
;
memset
(
&
sei
,
0
,
sizeof
(
sei
));
sei
.
cbSize
=
sizeof
(
sei
);
sei
.
lpFile
=
This
->
url
;
sei
.
nShow
=
SW_SHOW
;
if
(
ShellExecuteExW
(
&
sei
)
)
return
S_OK
;
else
return
E_FAIL
;
}
static
HRESULT
WINAPI
UniformResourceLocatorA_QueryInterface
(
IUniformResourceLocatorA
*
url
,
REFIID
riid
,
PVOID
*
ppvObject
)
...
...
@@ -299,8 +340,26 @@ static HRESULT WINAPI UniformResourceLocatorA_GetUrl(IUniformResourceLocatorA *u
static
HRESULT
WINAPI
UniformResourceLocatorA_InvokeCommand
(
IUniformResourceLocatorA
*
url
,
PURLINVOKECOMMANDINFOA
pCommandInfo
)
{
FIXME
(
"(%p, %p): stub
\n
"
,
url
,
pCommandInfo
);
return
E_NOTIMPL
;
URLINVOKECOMMANDINFOW
wideCommandInfo
;
int
len
;
WCHAR
*
wideVerb
;
HRESULT
res
;
InternetShortcut
*
This
=
impl_from_IUniformResourceLocatorA
(
url
);
wideCommandInfo
.
dwcbSize
=
sizeof
wideCommandInfo
;
wideCommandInfo
.
dwFlags
=
pCommandInfo
->
dwFlags
;
wideCommandInfo
.
hwndParent
=
pCommandInfo
->
hwndParent
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pCommandInfo
->
pcszVerb
,
-
1
,
NULL
,
0
);
wideVerb
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
pCommandInfo
->
pcszVerb
,
-
1
,
wideVerb
,
len
);
wideCommandInfo
.
pcszVerb
=
wideVerb
;
res
=
UniformResourceLocatorW_InvokeCommand
(
&
This
->
uniformResourceLocatorW
,
&
wideCommandInfo
);
heap_free
(
wideVerb
);
return
res
;
}
static
HRESULT
WINAPI
PersistFile_QueryInterface
(
IPersistFile
*
pFile
,
REFIID
riid
,
PVOID
*
ppvObject
)
...
...
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