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
0b9cfcfc
Commit
0b9cfcfc
authored
Jan 23, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddrawex: COM cleanup for the IDirectDrawFactory iface.
parent
3799ad34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
22 deletions
+24
-22
ddrawex_private.h
dlls/ddrawex/ddrawex_private.h
+0
-9
main.c
dlls/ddrawex/main.c
+24
-13
No files found.
dlls/ddrawex/ddrawex_private.h
View file @
0b9cfcfc
...
...
@@ -44,15 +44,6 @@ DECLARE_INTERFACE_(IDirectDrawFactory, IUnknown)
#endif
/******************************************************************************
* DirectDrawFactory implementation
******************************************************************************/
typedef
struct
{
const
IDirectDrawFactoryVtbl
*
lpVtbl
;
LONG
ref
;
}
IDirectDrawFactoryImpl
;
HRESULT
WINAPI
IDirectDrawFactoryImpl_CreateDirectDraw
(
IDirectDrawFactory
*
iface
,
GUID
*
pGUID
,
HWND
hWnd
,
DWORD
dwCoopLevelFlags
,
DWORD
dwReserved
,
IUnknown
*
pUnkOuter
,
IDirectDraw
**
ppDirectDraw
);
...
...
dlls/ddrawex/main.c
View file @
0b9cfcfc
...
...
@@ -150,16 +150,28 @@ static const IClassFactoryVtbl IClassFactory_Vtbl =
};
/******************************************************************************
* DirectDrawFactory implementation
******************************************************************************/
typedef
struct
{
IDirectDrawFactory
IDirectDrawFactory_iface
;
LONG
ref
;
}
IDirectDrawFactoryImpl
;
static
inline
IDirectDrawFactoryImpl
*
impl_from_IDirectDrawFactory
(
IDirectDrawFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectDrawFactoryImpl
,
IDirectDrawFactory_iface
);
}
/*******************************************************************************
* IDirectDrawFactory::QueryInterface
*
*******************************************************************************/
static
HRESULT
WINAPI
IDirectDrawFactoryImpl_QueryInterface
(
IDirectDrawFactory
*
iface
,
REFIID
riid
,
void
**
obj
)
static
HRESULT
WINAPI
IDirectDrawFactoryImpl_QueryInterface
(
IDirectDrawFactory
*
iface
,
REFIID
riid
,
void
**
obj
)
{
IDirectDrawFactoryImpl
*
This
=
(
IDirectDrawFactoryImpl
*
)
iface
;
IDirectDrawFactoryImpl
*
This
=
impl_from_IDirectDrawFactory
(
iface
)
;
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
...
...
@@ -179,10 +191,9 @@ IDirectDrawFactoryImpl_QueryInterface(IDirectDrawFactory *iface,
* IDirectDrawFactory::AddRef
*
*******************************************************************************/
static
ULONG
WINAPI
IDirectDrawFactoryImpl_AddRef
(
IDirectDrawFactory
*
iface
)
static
ULONG
WINAPI
IDirectDrawFactoryImpl_AddRef
(
IDirectDrawFactory
*
iface
)
{
IDirectDrawFactoryImpl
*
This
=
(
IDirectDrawFactoryImpl
*
)
iface
;
IDirectDrawFactoryImpl
*
This
=
impl_from_IDirectDrawFactory
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->() incrementing from %d.
\n
"
,
This
,
ref
-
1
);
...
...
@@ -194,11 +205,11 @@ IDirectDrawFactoryImpl_AddRef(IDirectDrawFactory *iface)
* IDirectDrawFactory::Release
*
*******************************************************************************/
static
ULONG
WINAPI
IDirectDrawFactoryImpl_Release
(
IDirectDrawFactory
*
iface
)
static
ULONG
WINAPI
IDirectDrawFactoryImpl_Release
(
IDirectDrawFactory
*
iface
)
{
IDirectDrawFactoryImpl
*
This
=
(
IDirectDrawFactoryImpl
*
)
iface
;
IDirectDrawFactoryImpl
*
This
=
impl_from_IDirectDrawFactory
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->() decrementing from %d.
\n
"
,
This
,
ref
+
1
);
if
(
ref
==
0
)
...
...
@@ -255,9 +266,9 @@ CreateDirectDrawFactory(IUnknown* UnkOuter, REFIID iid, void **obj)
return
E_OUTOFMEMORY
;
}
This
->
lpVtbl
=
&
IDirectDrawFactory_Vtbl
;
This
->
IDirectDrawFactory_iface
.
lpVtbl
=
&
IDirectDrawFactory_Vtbl
;
hr
=
IDirectDrawFactory_QueryInterface
(
(
IDirectDrawFactory
*
)
This
,
iid
,
obj
);
hr
=
IDirectDrawFactory_QueryInterface
(
&
This
->
IDirectDrawFactory_iface
,
iid
,
obj
);
if
(
FAILED
(
hr
))
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
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