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
adbcfb7e
Commit
adbcfb7e
authored
Dec 08, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use an iface instead of a vtbl pointer in PointerMonikerImpl.
parent
32fe620c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
pointermoniker.c
dlls/ole32/pointermoniker.c
+18
-13
No files found.
dlls/ole32/pointermoniker.c
View file @
adbcfb7e
...
...
@@ -40,17 +40,22 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
/* PointerMoniker data structure */
typedef
struct
PointerMonikerImpl
{
const
IMonikerVtbl
*
lpvtbl
;
/* VTable relative to the IMoniker interface.*/
IMoniker
IMoniker_iface
;
LONG
ref
;
/* reference counter for this object */
IUnknown
*
pObject
;
/* custom marshaler */
}
PointerMonikerImpl
;
static
inline
PointerMonikerImpl
*
impl_from_IMoniker
(
IMoniker
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
PointerMonikerImpl
,
IMoniker_iface
);
}
static
HRESULT
WINAPI
PointerMonikerImpl_QueryInterface
(
IMoniker
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
PointerMonikerImpl
*
This
=
(
PointerMonikerImpl
*
)
iface
;
PointerMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
)
;
TRACE
(
"(%p,%p,%p)
\n
"
,
This
,
riid
,
ppvObject
);
...
...
@@ -84,7 +89,7 @@ PointerMonikerImpl_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject)
static
ULONG
WINAPI
PointerMonikerImpl_AddRef
(
IMoniker
*
iface
)
{
PointerMonikerImpl
*
This
=
(
PointerMonikerImpl
*
)
iface
;
PointerMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
)
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -97,7 +102,7 @@ PointerMonikerImpl_AddRef(IMoniker* iface)
static
ULONG
WINAPI
PointerMonikerImpl_Release
(
IMoniker
*
iface
)
{
PointerMonikerImpl
*
This
=
(
PointerMonikerImpl
*
)
iface
;
PointerMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
)
;
ULONG
ref
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -194,7 +199,7 @@ static HRESULT WINAPI
PointerMonikerImpl_BindToObject
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
REFIID
riid
,
VOID
**
ppvResult
)
{
PointerMonikerImpl
*
This
=
(
PointerMonikerImpl
*
)
iface
;
PointerMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
)
;
TRACE
(
"(%p,%p,%p,%p,%p)
\n
"
,
iface
,
pbc
,
pmkToLeft
,
riid
,
ppvResult
);
...
...
@@ -211,7 +216,7 @@ static HRESULT WINAPI
PointerMonikerImpl_BindToStorage
(
IMoniker
*
iface
,
IBindCtx
*
pbc
,
IMoniker
*
pmkToLeft
,
REFIID
riid
,
VOID
**
ppvResult
)
{
PointerMonikerImpl
*
This
=
(
PointerMonikerImpl
*
)
iface
;
PointerMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
)
;
TRACE
(
"(%p,%p,%p,%p,%p)
\n
"
,
iface
,
pbc
,
pmkToLeft
,
riid
,
ppvResult
);
...
...
@@ -336,7 +341,7 @@ PointerMonikerImpl_Enum(IMoniker* iface,BOOL fForward, IEnumMoniker** ppenumMoni
static
HRESULT
WINAPI
PointerMonikerImpl_IsEqual
(
IMoniker
*
iface
,
IMoniker
*
pmkOtherMoniker
)
{
PointerMonikerImpl
*
This
=
(
PointerMonikerImpl
*
)
iface
;
PointerMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
)
;
DWORD
mkSys
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pmkOtherMoniker
);
...
...
@@ -348,7 +353,7 @@ PointerMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker)
if
(
mkSys
==
MKSYS_POINTERMONIKER
)
{
PointerMonikerImpl
*
pOtherMoniker
=
(
PointerMonikerImpl
*
)
pmkOtherMoniker
;
PointerMonikerImpl
*
pOtherMoniker
=
impl_from_IMoniker
(
pmkOtherMoniker
)
;
return
This
->
pObject
==
pOtherMoniker
->
pObject
?
S_OK
:
S_FALSE
;
}
else
...
...
@@ -360,7 +365,7 @@ PointerMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker)
******************************************************************************/
static
HRESULT
WINAPI
PointerMonikerImpl_Hash
(
IMoniker
*
iface
,
DWORD
*
pdwHash
)
{
PointerMonikerImpl
*
This
=
(
PointerMonikerImpl
*
)
iface
;
PointerMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
)
;
if
(
pdwHash
==
NULL
)
return
E_POINTER
;
...
...
@@ -467,7 +472,7 @@ PointerMonikerImpl_ParseDisplayName(IMoniker* iface, IBindCtx* pbc,
IMoniker
*
pmkToLeft
,
LPOLESTR
pszDisplayName
,
ULONG
*
pchEaten
,
IMoniker
**
ppmkOut
)
{
PointerMonikerImpl
*
This
=
(
PointerMonikerImpl
*
)
iface
;
PointerMonikerImpl
*
This
=
impl_from_IMoniker
(
iface
)
;
HRESULT
hr
;
IParseDisplayName
*
pPDN
;
...
...
@@ -543,8 +548,8 @@ static void PointerMonikerImpl_Construct(PointerMonikerImpl* This, IUnknown *pun
TRACE
(
"(%p)
\n
"
,
This
);
/* Initialize the virtual function table. */
This
->
lpvtbl
=
&
VT_PointerMonikerImpl
;
This
->
ref
=
1
;
This
->
IMoniker_iface
.
lpVtbl
=
&
VT_PointerMonikerImpl
;
This
->
ref
=
1
;
if
(
punk
)
IUnknown_AddRef
(
punk
);
This
->
pObject
=
punk
;
...
...
@@ -580,7 +585,7 @@ HRESULT WINAPI CreatePointerMoniker(LPUNKNOWN punk, LPMONIKER *ppmk)
}
PointerMonikerImpl_Construct
(
This
,
punk
);
*
ppmk
=
(
IMoniker
*
)
&
This
->
lpvtbl
;
*
ppmk
=
&
This
->
IMoniker_iface
;
return
S_OK
;
}
...
...
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