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
7a1d9105
Commit
7a1d9105
authored
May 26, 2011
by
Dylan Smith
Committed by
Alexandre Julliard
May 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: COM cleanup in main.c.
parent
cbc78b61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
main.c
dlls/d3dxof/main.c
+14
-9
No files found.
dlls/d3dxof/main.c
View file @
7a1d9105
...
@@ -64,12 +64,17 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
...
@@ -64,12 +64,17 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
* DirectX File ClassFactory
* DirectX File ClassFactory
*/
*/
typedef
struct
{
typedef
struct
{
IClassFactory
I
TF_IClassFactory
;
IClassFactory
I
ClassFactory_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
;
...
@@ -83,13 +88,13 @@ static const struct object_creation_info object_creation[] =
...
@@ -83,13 +88,13 @@ static const struct object_creation_info object_creation[] =
static
HRESULT
WINAPI
XFCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
XFCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
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
=
&
This
->
IClassFactory_iface
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -99,13 +104,13 @@ static HRESULT WINAPI XFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid, LPVO
...
@@ -99,13 +104,13 @@ static HRESULT WINAPI XFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid, LPVO
static
ULONG
WINAPI
XFCF_AddRef
(
LPCLASSFACTORY
iface
)
static
ULONG
WINAPI
XFCF_AddRef
(
LPCLASSFACTORY
iface
)
{
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
}
static
ULONG
WINAPI
XFCF_Release
(
LPCLASSFACTORY
iface
)
static
ULONG
WINAPI
XFCF_Release
(
LPCLASSFACTORY
iface
)
{
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
...
@@ -117,7 +122,7 @@ static ULONG WINAPI XFCF_Release(LPCLASSFACTORY iface)
...
@@ -117,7 +122,7 @@ static ULONG WINAPI XFCF_Release(LPCLASSFACTORY iface)
static
HRESULT
WINAPI
XFCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
XFCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
HRESULT
hres
;
HRESULT
hres
;
LPUNKNOWN
punk
;
LPUNKNOWN
punk
;
...
@@ -134,7 +139,7 @@ static HRESULT WINAPI XFCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter
...
@@ -134,7 +139,7 @@ static HRESULT WINAPI XFCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter
static
HRESULT
WINAPI
XFCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
static
HRESULT
WINAPI
XFCF_LockServer
(
LPCLASSFACTORY
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
;
}
}
...
@@ -211,12 +216,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
...
@@ -211,12 +216,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
factory
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
factory
));
factory
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
factory
));
if
(
factory
==
NULL
)
return
E_OUTOFMEMORY
;
if
(
factory
==
NULL
)
return
E_OUTOFMEMORY
;
factory
->
I
TF_IClassFactory
.
lpVtbl
=
&
XFCF_Vtbl
;
factory
->
I
ClassFactory_iface
.
lpVtbl
=
&
XFCF_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