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
645e1589
Commit
645e1589
authored
Aug 20, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: COM cleanup for the IClassFactory iface.
parent
84efd598
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
main.c
dlls/quartz/main.c
+20
-20
No files found.
dlls/quartz/main.c
View file @
645e1589
...
@@ -46,12 +46,16 @@ static HRESULT SeekingPassThru_create(IUnknown *pUnkOuter, LPVOID *ppObj)
...
@@ -46,12 +46,16 @@ static HRESULT SeekingPassThru_create(IUnknown *pUnkOuter, LPVOID *ppObj)
* DirectShow ClassFactory
* DirectShow ClassFactory
*/
*/
typedef
struct
{
typedef
struct
{
IClassFactory
ITF_IClassFactory
;
IClassFactory
IClassFactory_iface
;
LONG
ref
;
LONG
ref
;
HRESULT
(
*
pfnCreateInstance
)(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
HRESULT
(
*
pfnCreateInstance
)(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
);
}
IClassFactoryImpl
;
}
IClassFactoryImpl
;
static
inline
IClassFactoryImpl
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IClassFactoryImpl
,
IClassFactory_iface
);
}
struct
object_creation_info
struct
object_creation_info
{
{
const
CLSID
*
clsid
;
const
CLSID
*
clsid
;
...
@@ -81,34 +85,30 @@ static const struct object_creation_info object_creation[] =
...
@@ -81,34 +85,30 @@ static const struct object_creation_info object_creation[] =
{
&
CLSID_WAVEParser
,
WAVEParser_create
}
{
&
CLSID_WAVEParser
,
WAVEParser_create
}
};
};
static
HRESULT
WINAPI
static
HRESULT
WINAPI
DSCF_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppobj
)
DSCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IClassFactory
))
||
IsEqualGUID
(
riid
,
&
IID_IClassFactory
))
{
{
IClassFactory_AddRef
(
iface
);
IClassFactory_AddRef
(
iface
);
*
ppobj
=
This
;
*
ppobj
=
iface
;
return
S_OK
;
return
S_OK
;
}
}
*
ppobj
=
NULL
;
*
ppobj
=
NULL
;
WARN
(
"(%p)->(%s,%p),
not found
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
WARN
(
"(%p)->(%s,%p),
not found
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
}
static
ULONG
WINAPI
DSCF_AddRef
(
LPCLASSFACTORY
iface
)
static
ULONG
WINAPI
DSCF_AddRef
(
IClassFactory
*
iface
)
{
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
}
static
ULONG
WINAPI
DSCF_Release
(
LPCLASSFACTORY
iface
)
static
ULONG
WINAPI
DSCF_Release
(
IClassFactory
*
iface
)
{
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
if
(
ref
==
0
)
...
@@ -118,10 +118,10 @@ static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface)
...
@@ -118,10 +118,10 @@ static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface)
}
}
static
HRESULT
WINAPI
DSCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
static
HRESULT
WINAPI
DSCF_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
REFIID
riid
,
void
*
*
ppobj
)
{
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
HRESULT
hres
;
HRESULT
hres
;
LPUNKNOWN
punk
;
LPUNKNOWN
punk
;
...
@@ -139,9 +139,9 @@ static HRESULT WINAPI DSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter
...
@@ -139,9 +139,9 @@ static HRESULT WINAPI DSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter
return
hres
;
return
hres
;
}
}
static
HRESULT
WINAPI
DSCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
static
HRESULT
WINAPI
DSCF_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
{
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
FIXME
(
"(%p)->(%d),stub!
\n
"
,
This
,
dolock
);
FIXME
(
"(%p)->(%d),stub!
\n
"
,
This
,
dolock
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -187,12 +187,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
...
@@ -187,12 +187,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
IClassFactoryImpl
*
factory
=
CoTaskMemAlloc
(
sizeof
(
*
factory
));
IClassFactoryImpl
*
factory
=
CoTaskMemAlloc
(
sizeof
(
*
factory
));
if
(
factory
==
NULL
)
return
E_OUTOFMEMORY
;
if
(
factory
==
NULL
)
return
E_OUTOFMEMORY
;
factory
->
I
TF_IClassFactory
.
lpVtbl
=
&
DSCF_Vtbl
;
factory
->
I
ClassFactory_iface
.
lpVtbl
=
&
DSCF_Vtbl
;
factory
->
ref
=
1
;
factory
->
ref
=
1
;
factory
->
pfnCreateInstance
=
object_creation
[
i
].
pfnCreateInstance
;
factory
->
pfnCreateInstance
=
object_creation
[
i
].
pfnCreateInstance
;
*
ppv
=
&
factory
->
I
TF_IClassFactory
;
*
ppv
=
&
factory
->
I
ClassFactory_iface
;
return
S_OK
;
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