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
58775c87
Commit
58775c87
authored
Apr 30, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Added IDispatch support for ShellBrowserWindow instance.
parent
514345b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
19 deletions
+101
-19
shelldispatch.c
dlls/shell32/tests/shelldispatch.c
+3
-5
Makefile.in
programs/explorer/Makefile.in
+1
-1
desktop.c
programs/explorer/desktop.c
+97
-13
No files found.
dlls/shell32/tests/shelldispatch.c
View file @
58775c87
...
...
@@ -524,21 +524,19 @@ todo_wine {
/* IDispatch-related tests */
count
=
10
;
hr
=
IDispatch_GetTypeInfoCount
(
disp
,
&
count
);
todo_wine
{
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
count
==
1
,
"got %u
\n
"
,
count
);
}
hr
=
IDispatch_GetTypeInfo
(
disp
,
0
,
LOCALE_SYSTEM_DEFAULT
,
&
typeinfo
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
hr
=
ITypeInfo_GetTypeAttr
(
typeinfo
,
&
typeattr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
typeattr
->
guid
,
&
IID_IWebBrowser2
),
"type guid %s
\n
"
,
wine_dbgstr_guid
(
&
typeattr
->
guid
));
ITypeInfo_ReleaseTypeAttr
(
typeinfo
,
typeattr
);
ITypeInfo_Release
(
typeinfo
);
}
/* IWebBrowser2 */
hr
=
IDispatch_QueryInterface
(
disp
,
&
IID_IWebBrowser2
,
(
void
**
)
&
wb
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
programs/explorer/Makefile.in
View file @
58775c87
MODULE
=
explorer.exe
APPMODE
=
-mwindows
-municode
IMPORTS
=
rpcrt4 user32 gdi32 advapi32
DELAYIMPORTS
=
comctl32
shell
32 ole32 shlwapi
DELAYIMPORTS
=
comctl32
shell32 oleaut
32 ole32 shlwapi
C_SRCS
=
\
appbar.c
\
...
...
programs/explorer/desktop.c
View file @
58775c87
...
...
@@ -65,6 +65,66 @@ static int desktop_width, launcher_size, launchers_per_row;
static
struct
launcher
**
launchers
;
static
unsigned
int
nb_launchers
,
nb_allocated
;
static
REFIID
tid_ids
[]
=
{
&
IID_NULL
,
&
IID_IWebBrowser2
};
typedef
enum
{
NULL_tid
,
IWebBrowser2_tid
,
LAST_tid
}
tid_t
;
static
ITypeLib
*
typelib
;
static
ITypeInfo
*
typeinfos
[
LAST_tid
];
static
HRESULT
load_typelib
(
void
)
{
HRESULT
hres
;
ITypeLib
*
tl
;
hres
=
LoadRegTypeLib
(
&
LIBID_SHDocVw
,
1
,
0
,
LOCALE_SYSTEM_DEFAULT
,
&
tl
);
if
(
FAILED
(
hres
))
{
ERR
(
"LoadRegTypeLib failed: %08x
\n
"
,
hres
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
typelib
,
tl
,
NULL
))
ITypeLib_Release
(
tl
);
return
hres
;
}
static
HRESULT
get_typeinfo
(
tid_t
tid
,
ITypeInfo
**
typeinfo
)
{
HRESULT
hres
;
if
(
!
typelib
)
hres
=
load_typelib
();
if
(
!
typelib
)
return
hres
;
if
(
!
typeinfos
[
tid
])
{
ITypeInfo
*
ti
;
hres
=
ITypeLib_GetTypeInfoOfGuid
(
typelib
,
tid_ids
[
tid
],
&
ti
);
if
(
FAILED
(
hres
))
{
ERR
(
"GetTypeInfoOfGuid(%s) failed: %08x
\n
"
,
debugstr_guid
(
tid_ids
[
tid
]),
hres
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)(
typeinfos
+
tid
),
ti
,
NULL
))
ITypeInfo_Release
(
ti
);
}
*
typeinfo
=
typeinfos
[
tid
];
ITypeInfo_AddRef
(
*
typeinfo
);
return
S_OK
;
}
struct
shellwindows
{
IShellWindows
IShellWindows_iface
;
...
...
@@ -1246,19 +1306,17 @@ static ULONG WINAPI webbrowser_Release(IWebBrowser2 *iface)
static
HRESULT
WINAPI
webbrowser_GetTypeInfoCount
(
IWebBrowser2
*
iface
,
UINT
*
pctinfo
)
{
struct
shellbrowserwindow
*
This
=
impl_from_IWebBrowser2
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
pctinfo
);
*
pctinfo
=
0
;
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
*
pctinfo
=
1
;
return
S_OK
;
}
static
HRESULT
WINAPI
webbrowser_GetTypeInfo
(
IWebBrowser2
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
LPTYPEINFO
*
ppTInfo
)
{
struct
shellbrowserwindow
*
This
=
impl_from_IWebBrowser2
(
iface
);
FIXME
(
"(%p)->(%d %d %p): stub
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d %d %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
get_typeinfo
(
IWebBrowser2_tid
,
ppTInfo
)
;
}
static
HRESULT
WINAPI
webbrowser_GetIDsOfNames
(
IWebBrowser2
*
iface
,
REFIID
riid
,
...
...
@@ -1266,20 +1324,46 @@ static HRESULT WINAPI webbrowser_GetIDsOfNames(IWebBrowser2 *iface, REFIID riid,
LCID
lcid
,
DISPID
*
rgDispId
)
{
struct
shellbrowserwindow
*
This
=
impl_from_IWebBrowser2
(
iface
);
FIXME
(
"(%p)->(%s %p %d %d %p): stub
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"(%p)->(%s %p %d %d %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
return
E_NOTIMPL
;
if
(
!
rgszNames
||
cNames
==
0
||
!
rgDispId
)
return
E_INVALIDARG
;
hr
=
get_typeinfo
(
IWebBrowser2_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_GetIDsOfNames
(
typeinfo
,
rgszNames
,
cNames
,
rgDispId
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
webbrowser_Invoke
(
IWebBrowser2
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExepInfo
,
UINT
*
puArgErr
)
EXCEPINFO
*
pEx
c
epInfo
,
UINT
*
puArgErr
)
{
struct
shellbrowserwindow
*
This
=
impl_from_IWebBrowser2
(
iface
);
FIXME
(
"(%p)->(%d %s %d %08x %p %p %p %p): stub
\n
"
,
This
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExepInfo
,
puArgErr
);
return
E_NOTIMPL
;
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"(%p)->(%d %s %d %08x %p %p %p %p)
\n
"
,
This
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
hr
=
get_typeinfo
(
IWebBrowser2_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_Invoke
(
typeinfo
,
&
This
->
IWebBrowser2_iface
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
/* IWebBrowser methods */
...
...
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