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
1881db6a
Commit
1881db6a
authored
Nov 29, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Use an iface instead of a vtbl pointer in ClassFactoryImpl.
parent
624ca877
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
clsfactory.c
dlls/windowscodecs/clsfactory.c
+11
-6
No files found.
dlls/windowscodecs/clsfactory.c
View file @
1881db6a
...
...
@@ -59,15 +59,20 @@ static classinfo wic_classes[] = {
{
0
}};
typedef
struct
{
const
IClassFactoryVtbl
*
lpIClassFactoryVtbl
;
IClassFactory
IClassFactory_iface
;
LONG
ref
;
classinfo
*
info
;
}
ClassFactoryImpl
;
static
inline
ClassFactoryImpl
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ClassFactoryImpl
,
IClassFactory_iface
);
}
static
HRESULT
WINAPI
ClassFactoryImpl_QueryInterface
(
IClassFactory
*
iface
,
REFIID
iid
,
void
**
ppv
)
{
ClassFactoryImpl
*
This
=
(
ClassFactoryImpl
*
)
iface
;
ClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
TRACE
(
"(%p,%s,%p)
\n
"
,
iface
,
debugstr_guid
(
iid
),
ppv
);
if
(
!
ppv
)
return
E_INVALIDARG
;
...
...
@@ -88,7 +93,7 @@ static HRESULT WINAPI ClassFactoryImpl_QueryInterface(IClassFactory *iface,
static
ULONG
WINAPI
ClassFactoryImpl_AddRef
(
IClassFactory
*
iface
)
{
ClassFactoryImpl
*
This
=
(
ClassFactoryImpl
*
)
iface
;
ClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
...
...
@@ -98,7 +103,7 @@ static ULONG WINAPI ClassFactoryImpl_AddRef(IClassFactory *iface)
static
ULONG
WINAPI
ClassFactoryImpl_Release
(
IClassFactory
*
iface
)
{
ClassFactoryImpl
*
This
=
(
ClassFactoryImpl
*
)
iface
;
ClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
...
...
@@ -112,7 +117,7 @@ static ULONG WINAPI ClassFactoryImpl_Release(IClassFactory *iface)
static
HRESULT
WINAPI
ClassFactoryImpl_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
{
ClassFactoryImpl
*
This
=
(
ClassFactoryImpl
*
)
iface
;
ClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
return
This
->
info
->
constructor
(
pUnkOuter
,
riid
,
ppv
);
}
...
...
@@ -141,7 +146,7 @@ static HRESULT ClassFactoryImpl_Constructor(classinfo *info, REFIID riid, LPVOID
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ClassFactoryImpl
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpIClassFactory
Vtbl
=
&
ClassFactoryImpl_Vtbl
;
This
->
IClassFactory_iface
.
lp
Vtbl
=
&
ClassFactoryImpl_Vtbl
;
This
->
ref
=
1
;
This
->
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