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
be01cdb6
Commit
be01cdb6
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: Move OpenURL() from shdocvw_main.c into intshcut.c, and implement it.
parent
44f929fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
13 deletions
+57
-13
intshcut.c
dlls/shdocvw/intshcut.c
+57
-5
shdocvw_main.c
dlls/shdocvw/shdocvw_main.c
+0
-8
No files found.
dlls/shdocvw/intshcut.c
View file @
be01cdb6
...
...
@@ -27,6 +27,9 @@
* The installer for the Zuma Deluxe Popcap game is good for testing.
*/
#include <stdarg.h>
#include <stdio.h>
#include "wine/debug.h"
#include "shdocvw.h"
#include "objidl.h"
...
...
@@ -34,6 +37,7 @@
#include "intshcut.h"
#include "shellapi.h"
#include "winreg.h"
#include "shlwapi.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
shdocvw
);
...
...
@@ -565,6 +569,22 @@ static const IPersistFileVtbl persistFileVtbl = {
PersistFile_GetCurFile
};
static
InternetShortcut
*
create_shortcut
(
void
)
{
InternetShortcut
*
newshortcut
;
newshortcut
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
InternetShortcut
));
if
(
newshortcut
)
{
newshortcut
->
uniformResourceLocatorA
.
lpVtbl
=
&
uniformResourceLocatorAVtbl
;
newshortcut
->
uniformResourceLocatorW
.
lpVtbl
=
&
uniformResourceLocatorWVtbl
;
newshortcut
->
persistFile
.
lpVtbl
=
&
persistFileVtbl
;
newshortcut
->
refCount
=
0
;
}
return
newshortcut
;
}
HRESULT
InternetShortcut_Create
(
IUnknown
*
pOuter
,
REFIID
riid
,
void
**
ppv
)
{
InternetShortcut
*
This
;
...
...
@@ -577,13 +597,9 @@ HRESULT InternetShortcut_Create(IUnknown *pOuter, REFIID riid, void **ppv)
if
(
pOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
InternetShortcut
)
);
This
=
create_shortcut
(
);
if
(
This
)
{
This
->
uniformResourceLocatorA
.
lpVtbl
=
&
uniformResourceLocatorAVtbl
;
This
->
uniformResourceLocatorW
.
lpVtbl
=
&
uniformResourceLocatorWVtbl
;
This
->
persistFile
.
lpVtbl
=
&
persistFileVtbl
;
This
->
refCount
=
0
;
hr
=
Unknown_QueryInterface
(
This
,
riid
,
ppv
);
if
(
SUCCEEDED
(
hr
))
SHDOCVW_LockModule
();
...
...
@@ -594,3 +610,39 @@ HRESULT InternetShortcut_Create(IUnknown *pOuter, REFIID riid, void **ppv)
else
return
E_OUTOFMEMORY
;
}
/**********************************************************************
* OpenURL (SHDOCVW.@)
*/
void
WINAPI
OpenURL
(
HWND
hWnd
,
HINSTANCE
hInst
,
LPCSTR
lpcstrUrl
,
int
nShowCmd
)
{
InternetShortcut
*
shortcut
;
WCHAR
*
urlfilepath
=
NULL
;
shortcut
=
create_shortcut
();
if
(
shortcut
)
{
int
len
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpcstrUrl
,
-
1
,
NULL
,
0
);
urlfilepath
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
lpcstrUrl
,
-
1
,
urlfilepath
,
len
);
if
(
SUCCEEDED
(
IPersistFile_Load
(
&
shortcut
->
persistFile
,
urlfilepath
,
0
)))
{
URLINVOKECOMMANDINFOW
ici
;
memset
(
&
ici
,
0
,
sizeof
ici
);
ici
.
dwcbSize
=
sizeof
ici
;
ici
.
dwFlags
=
IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB
;
ici
.
hwndParent
=
hWnd
;
if
FAILED
(
UniformResourceLocatorW_InvokeCommand
(
&
shortcut
->
uniformResourceLocatorW
,
(
PURLINVOKECOMMANDINFOW
)
&
ici
))
TRACE
(
"failed to open URL: %s
\n
."
,
debugstr_a
(
lpcstrUrl
));
}
heap_free
(
shortcut
);
heap_free
(
urlfilepath
);
}
}
dlls/shdocvw/shdocvw_main.c
View file @
be01cdb6
...
...
@@ -219,14 +219,6 @@ DWORD WINAPI SetQueryNetSessionCount(DWORD arg)
}
/**********************************************************************
* OpenURL (SHDOCVW.@)
*/
void
WINAPI
OpenURL
(
HWND
hWnd
,
HINSTANCE
hInst
,
LPCSTR
lpcstrUrl
,
int
nShowCmd
)
{
FIXME
(
"%p %p %s %d
\n
"
,
hWnd
,
hInst
,
debugstr_a
(
lpcstrUrl
),
nShowCmd
);
}
/**********************************************************************
* Some forwards (by ordinal) to SHLWAPI
*/
...
...
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