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
cc43c46f
Commit
cc43c46f
authored
Dec 31, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 31, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: COM cleanup for the IUnknown iface.
parent
1412b471
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
dispex.c
dlls/mshtml/dispex.c
+11
-12
No files found.
dlls/mshtml/dispex.c
View file @
cc43c46f
...
...
@@ -59,13 +59,11 @@ typedef struct {
typedef
struct
{
DispatchEx
dispex
;
const
IUnknownVtbl
*
lpIUnknownVtbl
;
IUnknown
IUnknown_iface
;
DispatchEx
*
obj
;
func_info_t
*
info
;
}
func_disp_t
;
#define FUNCUNKNOWN(x) ((IUnknown*) &(x)->lpIUnknownVtbl)
struct
dispex_dynamic_data_t
{
DWORD
buf_size
;
DWORD
prop_cnt
;
...
...
@@ -488,15 +486,18 @@ static HRESULT typeinfo_invoke(DispatchEx *This, func_info_t *func, WORD flags,
return
hres
;
}
#define FUNCTION_THIS(iface) DEFINE_THIS(func_disp_t, IUnknown, iface)
static
inline
func_disp_t
*
impl_from_IUnknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
func_disp_t
,
IUnknown_iface
);
}
static
HRESULT
WINAPI
Function_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
func_disp_t
*
This
=
FUNCTION_THIS
(
iface
);
func_disp_t
*
This
=
impl_from_IUnknown
(
iface
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
FUNCUNKNOWN
(
This
)
;
*
ppv
=
&
This
->
IUnknown_iface
;
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
{
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
...
...
@@ -510,7 +511,7 @@ static HRESULT WINAPI Function_QueryInterface(IUnknown *iface, REFIID riid, void
static
ULONG
WINAPI
Function_AddRef
(
IUnknown
*
iface
)
{
func_disp_t
*
This
=
FUNCTION_THIS
(
iface
);
func_disp_t
*
This
=
impl_from_IUnknown
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -519,15 +520,13 @@ static ULONG WINAPI Function_AddRef(IUnknown *iface)
static
ULONG
WINAPI
Function_Release
(
IUnknown
*
iface
)
{
func_disp_t
*
This
=
FUNCTION_THIS
(
iface
);
func_disp_t
*
This
=
impl_from_IUnknown
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IDispatchEx_Release
(
&
This
->
obj
->
IDispatchEx_iface
);
}
#undef FUNCTION_THIS
static
const
IUnknownVtbl
FunctionUnkVtbl
=
{
Function_QueryInterface
,
Function_AddRef
,
...
...
@@ -583,8 +582,8 @@ static func_disp_t *create_func_disp(DispatchEx *obj, func_info_t *info)
if
(
!
ret
)
return
NULL
;
ret
->
lpIUnknown
Vtbl
=
&
FunctionUnkVtbl
;
init_dispex
(
&
ret
->
dispex
,
FUNCUNKNOWN
(
ret
)
,
&
function_dispex
);
ret
->
IUnknown_iface
.
lp
Vtbl
=
&
FunctionUnkVtbl
;
init_dispex
(
&
ret
->
dispex
,
&
ret
->
IUnknown_iface
,
&
function_dispex
);
ret
->
obj
=
obj
;
ret
->
info
=
info
;
...
...
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