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
7e106986
Commit
7e106986
authored
Dec 08, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Use an iface instead of a vtbl pointer in PropertyBag.
parent
cbee3a56
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
propertybag.c
dlls/windowscodecs/propertybag.c
+11
-6
No files found.
dlls/windowscodecs/propertybag.c
View file @
7e106986
...
...
@@ -34,14 +34,19 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wincodecs
);
typedef
struct
PropertyBag
{
const
IPropertyBag2Vtbl
*
lpVtbl
;
IPropertyBag2
IPropertyBag2_iface
;
LONG
ref
;
}
PropertyBag
;
static
inline
PropertyBag
*
impl_from_IPropertyBag2
(
IPropertyBag2
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
PropertyBag
,
IPropertyBag2_iface
);
}
static
HRESULT
WINAPI
PropertyBag_QueryInterface
(
IPropertyBag2
*
iface
,
REFIID
iid
,
void
**
ppv
)
{
PropertyBag
*
This
=
(
PropertyBag
*
)
iface
;
PropertyBag
*
This
=
impl_from_IPropertyBag2
(
iface
)
;
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
iid
),
ppv
);
if
(
!
ppv
)
return
E_INVALIDARG
;
...
...
@@ -63,7 +68,7 @@ static HRESULT WINAPI PropertyBag_QueryInterface(IPropertyBag2 *iface, REFIID ii
static
ULONG
WINAPI
PropertyBag_AddRef
(
IPropertyBag2
*
iface
)
{
PropertyBag
*
This
=
(
PropertyBag
*
)
iface
;
PropertyBag
*
This
=
impl_from_IPropertyBag2
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
...
...
@@ -73,7 +78,7 @@ static ULONG WINAPI PropertyBag_AddRef(IPropertyBag2 *iface)
static
ULONG
WINAPI
PropertyBag_Release
(
IPropertyBag2
*
iface
)
{
PropertyBag
*
This
=
(
PropertyBag
*
)
iface
;
PropertyBag
*
This
=
impl_from_IPropertyBag2
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
...
...
@@ -138,10 +143,10 @@ extern HRESULT CreatePropertyBag2(IPropertyBag2 **ppPropertyBag2)
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
PropertyBag
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
PropertyBag_Vtbl
;
This
->
IPropertyBag2_iface
.
lpVtbl
=
&
PropertyBag_Vtbl
;
This
->
ref
=
1
;
*
ppPropertyBag2
=
(
IPropertyBag2
*
)
This
;
*
ppPropertyBag2
=
&
This
->
IPropertyBag2_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