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
ec1f8b53
Commit
ec1f8b53
authored
Dec 04, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Use an iface instead of a vtbl pointer in StdDispatch.
parent
fd6ba85f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
dispatch.c
dlls/oleaut32/dispatch.c
+16
-11
No files found.
dlls/oleaut32/dispatch.c
View file @
ec1f8b53
...
...
@@ -232,12 +232,17 @@ HRESULT WINAPI CreateStdDispatch(
typedef
struct
{
const
IDispatchVtbl
*
lpVtbl
;
IDispatch
IDispatch_iface
;
void
*
pvThis
;
ITypeInfo
*
pTypeInfo
;
LONG
ref
;
}
StdDispatch
;
static
inline
StdDispatch
*
impl_from_IDispatch
(
IDispatch
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
StdDispatch
,
IDispatch_iface
);
}
/******************************************************************************
* IDispatch_QueryInterface {OLEAUT32}
*
...
...
@@ -248,7 +253,7 @@ static HRESULT WINAPI StdDispatch_QueryInterface(
REFIID
riid
,
void
**
ppvObject
)
{
StdDispatch
*
This
=
(
StdDispatch
*
)
iface
;
StdDispatch
*
This
=
impl_from_IDispatch
(
iface
)
;
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualIID
(
riid
,
&
IID_IDispatch
)
||
...
...
@@ -268,7 +273,7 @@ static HRESULT WINAPI StdDispatch_QueryInterface(
*/
static
ULONG
WINAPI
StdDispatch_AddRef
(
LPDISPATCH
iface
)
{
StdDispatch
*
This
=
(
StdDispatch
*
)
iface
;
StdDispatch
*
This
=
impl_from_IDispatch
(
iface
)
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
-
1
);
...
...
@@ -283,7 +288,7 @@ static ULONG WINAPI StdDispatch_AddRef(LPDISPATCH iface)
*/
static
ULONG
WINAPI
StdDispatch_Release
(
LPDISPATCH
iface
)
{
StdDispatch
*
This
=
(
StdDispatch
*
)
iface
;
StdDispatch
*
This
=
impl_from_IDispatch
(
iface
)
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
+
1
);
...
...
@@ -316,7 +321,7 @@ static ULONG WINAPI StdDispatch_Release(LPDISPATCH iface)
*/
static
HRESULT
WINAPI
StdDispatch_GetTypeInfoCount
(
LPDISPATCH
iface
,
UINT
*
pctinfo
)
{
StdDispatch
*
This
=
(
StdDispatch
*
)
iface
;
StdDispatch
*
This
=
impl_from_IDispatch
(
iface
)
;
TRACE
(
"(%p)
\n
"
,
pctinfo
);
*
pctinfo
=
This
->
pTypeInfo
?
1
:
0
;
...
...
@@ -343,7 +348,7 @@ static HRESULT WINAPI StdDispatch_GetTypeInfoCount(LPDISPATCH iface, UINT * pcti
*/
static
HRESULT
WINAPI
StdDispatch_GetTypeInfo
(
LPDISPATCH
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
StdDispatch
*
This
=
(
StdDispatch
*
)
iface
;
StdDispatch
*
This
=
impl_from_IDispatch
(
iface
)
;
TRACE
(
"(%d, %x, %p)
\n
"
,
iTInfo
,
lcid
,
ppTInfo
);
*
ppTInfo
=
NULL
;
...
...
@@ -386,7 +391,7 @@ static HRESULT WINAPI StdDispatch_GetTypeInfo(LPDISPATCH iface, UINT iTInfo, LCI
*/
static
HRESULT
WINAPI
StdDispatch_GetIDsOfNames
(
LPDISPATCH
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
StdDispatch
*
This
=
(
StdDispatch
*
)
iface
;
StdDispatch
*
This
=
impl_from_IDispatch
(
iface
)
;
TRACE
(
"(%s, %p, %d, 0x%x, %p)
\n
"
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
if
(
!
IsEqualGUID
(
riid
,
&
IID_NULL
))
...
...
@@ -424,7 +429,7 @@ static HRESULT WINAPI StdDispatch_Invoke(LPDISPATCH iface, DISPID dispIdMember,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
StdDispatch
*
This
=
(
StdDispatch
*
)
iface
;
StdDispatch
*
This
=
impl_from_IDispatch
(
iface
)
;
TRACE
(
"(%d, %s, 0x%x, 0x%x, %p, %p, %p, %p)
\n
"
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
if
(
!
IsEqualGUID
(
riid
,
&
IID_NULL
))
...
...
@@ -455,9 +460,9 @@ static IDispatch * StdDispatch_Construct(
pStdDispatch
=
CoTaskMemAlloc
(
sizeof
(
StdDispatch
));
if
(
!
pStdDispatch
)
return
(
IDispatch
*
)
pStdDispatch
;
return
&
pStdDispatch
->
IDispatch_iface
;
pStdDispatch
->
lpVtbl
=
&
StdDispatch_VTable
;
pStdDispatch
->
IDispatch_iface
.
lpVtbl
=
&
StdDispatch_VTable
;
pStdDispatch
->
pvThis
=
pvThis
;
pStdDispatch
->
pTypeInfo
=
pTypeInfo
;
pStdDispatch
->
ref
=
1
;
...
...
@@ -466,5 +471,5 @@ static IDispatch * StdDispatch_Construct(
* being destroyed until we are done with it */
ITypeInfo_AddRef
(
pTypeInfo
);
return
(
IDispatch
*
)
pStdDispatch
;
return
&
pStdDispatch
->
IDispatch_iface
;
}
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