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
b88e09e2
Commit
b88e09e2
authored
Jan 27, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: COM cleanup for the ID3DXEffectPool iface.
parent
03321ad0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
effect.c
dlls/d3dx9_36/effect.c
+12
-7
No files found.
dlls/d3dx9_36/effect.c
View file @
b88e09e2
...
...
@@ -926,21 +926,26 @@ HRESULT WINAPI D3DXCreateEffectCompiler(LPCSTR srcdata,
static
const
struct
ID3DXEffectPoolVtbl
ID3DXEffectPool_Vtbl
;
typedef
struct
ID3DXEffectPoolImpl
{
const
ID3DXEffectPoolVtbl
*
lpVtbl
;
ID3DXEffectPool
ID3DXEffectPool_iface
;
LONG
ref
;
}
ID3DXEffectPoolImpl
;
static
inline
ID3DXEffectPoolImpl
*
impl_from_ID3DXEffectPool
(
ID3DXEffectPool
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ID3DXEffectPoolImpl
,
ID3DXEffectPool_iface
);
}
/*** IUnknown methods ***/
static
HRESULT
WINAPI
ID3DXEffectPoolImpl_QueryInterface
(
ID3DXEffectPool
*
iface
,
REFIID
riid
,
void
**
object
)
{
ID3DXEffectPoolImpl
*
This
=
(
ID3DXEffectPoolImpl
*
)
iface
;
ID3DXEffectPoolImpl
*
This
=
impl_from_ID3DXEffectPool
(
iface
)
;
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_ID3DXEffectPool
))
{
This
->
lpVtbl
->
AddRef
(
iface
);
This
->
ID3DXEffectPool_iface
.
lpVtbl
->
AddRef
(
iface
);
*
object
=
This
;
return
S_OK
;
}
...
...
@@ -952,7 +957,7 @@ static HRESULT WINAPI ID3DXEffectPoolImpl_QueryInterface(ID3DXEffectPool* iface,
static
ULONG
WINAPI
ID3DXEffectPoolImpl_AddRef
(
ID3DXEffectPool
*
iface
)
{
ID3DXEffectPoolImpl
*
This
=
(
ID3DXEffectPoolImpl
*
)
iface
;
ID3DXEffectPoolImpl
*
This
=
impl_from_ID3DXEffectPool
(
iface
)
;
TRACE
(
"(%p)->(): AddRef from %u
\n
"
,
This
,
This
->
ref
);
...
...
@@ -961,7 +966,7 @@ static ULONG WINAPI ID3DXEffectPoolImpl_AddRef(ID3DXEffectPool* iface)
static
ULONG
WINAPI
ID3DXEffectPoolImpl_Release
(
ID3DXEffectPool
*
iface
)
{
ID3DXEffectPoolImpl
*
This
=
(
ID3DXEffectPoolImpl
*
)
iface
;
ID3DXEffectPoolImpl
*
This
=
impl_from_ID3DXEffectPool
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(): Release from %u
\n
"
,
This
,
ref
+
1
);
...
...
@@ -996,10 +1001,10 @@ HRESULT WINAPI D3DXCreateEffectPool(LPD3DXEFFECTPOOL* pool)
return
E_OUTOFMEMORY
;
}
object
->
lpVtbl
=
&
ID3DXEffectPool_Vtbl
;
object
->
ID3DXEffectPool_iface
.
lpVtbl
=
&
ID3DXEffectPool_Vtbl
;
object
->
ref
=
1
;
*
pool
=
(
LPD3DXEFFECTPOOL
)
object
;
*
pool
=
&
object
->
ID3DXEffectPool_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