Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
58775c87
Commit
58775c87
authored
9 years ago
by
Nikolay Sivov
Committed by
Alexandre Julliard
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
explorer: Added IDispatch support for ShellBrowserWindow instance.
parent
514345b4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/shell32/tests/shelldispatch.c
+3
-5
3 additions, 5 deletions
dlls/shell32/tests/shelldispatch.c
programs/explorer/Makefile.in
+1
-1
1 addition, 1 deletion
programs/explorer/Makefile.in
programs/explorer/desktop.c
+97
-13
97 additions, 13 deletions
programs/explorer/desktop.c
with
101 additions
and
19 deletions
dlls/shell32/tests/shelldispatch.c
+
3
−
5
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
);
...
...
This diff is collapsed.
Click to expand it.
programs/explorer/Makefile.in
+
1
−
1
View file @
58775c87
MODULE
=
explorer.exe
APPMODE
=
-mwindows
-municode
IMPORTS
=
rpcrt4 user32 gdi32 advapi32
DELAYIMPORTS
=
comctl32
shell32 ole32 shlwapi
DELAYIMPORTS
=
comctl32 shell32
oleaut32
ole32 shlwapi
C_SRCS
=
\
appbar.c
\
...
...
This diff is collapsed.
Click to expand it.
programs/explorer/desktop.c
+
97
−
13
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
);
FIXM
E
(
"(%p)->(%d %d %p)
: stub
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
E_NOTIMPL
;
TRAC
E
(
"(%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 */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment