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
37da1e67
Commit
37da1e67
authored
Jul 09, 2003
by
Robert Shearman
Committed by
Alexandre Julliard
Jul 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- AddRef type info stored in StdDispatch.
- Don't use outer unknown in StdDispatch.
parent
18149487
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
dispatch.c
dlls/oleaut32/dispatch.c
+14
-17
No files found.
dlls/oleaut32/dispatch.c
View file @
37da1e67
...
...
@@ -160,6 +160,9 @@ HRESULT WINAPI DispGetParam(
* RETURNS
* Success: S_OK. ppunkStdDisp contains the new object.
* Failure: An HRESULT error code.
*
* NOTES
* Outer unknown appears to be completely ignored.
*/
HRESULT
WINAPI
CreateStdDispatch
(
IUnknown
*
punkOuter
,
...
...
@@ -235,7 +238,6 @@ HRESULT WINAPI CreateDispTypeInfo(
typedef
struct
{
ICOM_VFIELD
(
IDispatch
);
IUnknown
*
outerUnknown
;
void
*
pvThis
;
ITypeInfo
*
pTypeInfo
;
ULONG
ref
;
...
...
@@ -254,9 +256,6 @@ static HRESULT WINAPI StdDispatch_QueryInterface(
ICOM_THIS
(
StdDispatch
,
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
This
->
outerUnknown
)
return
IUnknown_QueryInterface
(
This
->
outerUnknown
,
riid
,
ppvObject
);
if
(
IsEqualIID
(
riid
,
&
IID_IDispatch
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
...
...
@@ -276,11 +275,8 @@ static ULONG WINAPI StdDispatch_AddRef(LPDISPATCH iface)
{
ICOM_THIS
(
StdDispatch
,
iface
);
TRACE
(
"()
\n
"
);
This
->
ref
++
;
if
(
This
->
outerUnknown
)
return
IUnknown_AddRef
(
This
->
outerUnknown
);
else
return
This
->
ref
;
return
++
This
->
ref
;
}
/******************************************************************************
...
...
@@ -294,15 +290,13 @@ static ULONG WINAPI StdDispatch_Release(LPDISPATCH iface)
ULONG
ret
;
TRACE
(
"(%p)->()
\n
"
,
This
);
This
->
ref
--
;
ret
=
This
->
ref
--
;
if
(
This
->
outerUnknown
)
ret
=
IUnknown_Release
(
This
->
outerUnknown
);
else
ret
=
This
->
ref
;
if
(
This
->
ref
<=
0
)
if
(
This
->
ref
==
0
)
{
ITypeInfo_Release
(
This
->
pTypeInfo
);
CoTaskMemFree
(
This
);
}
return
ret
;
}
...
...
@@ -469,10 +463,13 @@ static IDispatch * WINAPI StdDispatch_Construct(
return
(
IDispatch
*
)
pStdDispatch
;
pStdDispatch
->
lpVtbl
=
&
StdDispatch_VTable
;
pStdDispatch
->
outerUnknown
=
punkOuter
;
pStdDispatch
->
pvThis
=
pvThis
;
pStdDispatch
->
pTypeInfo
=
pTypeInfo
;
pStdDispatch
->
ref
=
1
;
/* we keep a reference to the type info so prevent it from
* being destroyed until we are done with it */
ITypeInfo_AddRef
(
pTypeInfo
);
return
(
IDispatch
*
)
pStdDispatch
;
}
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