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
3799ad34
Commit
3799ad34
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 IClassFactory iface.
parent
68d5d33e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
31 deletions
+31
-31
ddrawex_private.h
dlls/ddrawex/ddrawex_private.h
+0
-10
main.c
dlls/ddrawex/main.c
+31
-21
No files found.
dlls/ddrawex/ddrawex_private.h
View file @
3799ad34
...
...
@@ -43,16 +43,6 @@ DECLARE_INTERFACE_(IDirectDrawFactory, IUnknown)
#define IDirectDrawFactory_DirectDrawEnumerate(p,a,b) (p)->lpVtbl->_DirectDrawEnumerate(p,a,b)
#endif
/******************************************************************************
* DirectDraw ClassFactory implementation - incomplete
******************************************************************************/
typedef
struct
{
const
IClassFactoryVtbl
*
lpVtbl
;
LONG
ref
;
HRESULT
(
*
pfnCreateInstance
)(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
LPVOID
*
ppObj
);
}
IClassFactoryImpl
;
/******************************************************************************
* DirectDrawFactory implementation
...
...
dlls/ddrawex/main.c
View file @
3799ad34
...
...
@@ -39,16 +39,29 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddrawex);
static
HINSTANCE
instance
;
/******************************************************************************
* DirectDraw ClassFactory implementation
******************************************************************************/
typedef
struct
{
IClassFactory
IClassFactory_iface
;
LONG
ref
;
HRESULT
(
*
pfnCreateInstance
)(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
LPVOID
*
ppObj
);
}
IClassFactoryImpl
;
static
inline
IClassFactoryImpl
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IClassFactoryImpl
,
IClassFactory_iface
);
}
/*******************************************************************************
* IDirectDrawClassFactory::QueryInterface
*
*******************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClassFactoryImpl_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
obj
)
static
HRESULT
WINAPI
IDirectDrawClassFactoryImpl_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
obj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
...
...
@@ -68,10 +81,9 @@ IDirectDrawClassFactoryImpl_QueryInterface(IClassFactory *iface,
* IDirectDrawClassFactory::AddRef
*
*******************************************************************************/
static
ULONG
WINAPI
IDirectDrawClassFactoryImpl_AddRef
(
IClassFactory
*
iface
)
static
ULONG
WINAPI
IDirectDrawClassFactoryImpl_AddRef
(
IClassFactory
*
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->() incrementing from %d.
\n
"
,
This
,
ref
-
1
);
...
...
@@ -83,11 +95,11 @@ IDirectDrawClassFactoryImpl_AddRef(IClassFactory *iface)
* IDirectDrawClassFactory::Release
*
*******************************************************************************/
static
ULONG
WINAPI
IDirectDrawClassFactoryImpl_Release
(
IClassFactory
*
iface
)
static
ULONG
WINAPI
IDirectDrawClassFactoryImpl_Release
(
IClassFactory
*
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->() decrementing from %d.
\n
"
,
This
,
ref
+
1
);
if
(
ref
==
0
)
...
...
@@ -101,13 +113,10 @@ IDirectDrawClassFactoryImpl_Release(IClassFactory *iface)
* IDirectDrawClassFactory::CreateInstance
*
*******************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClassFactoryImpl_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
UnkOuter
,
REFIID
riid
,
void
**
obj
)
static
HRESULT
WINAPI
IDirectDrawClassFactoryImpl_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
UnkOuter
,
REFIID
riid
,
void
**
obj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
TRACE
(
"(%p)->(%p,%s,%p)
\n
"
,
This
,
UnkOuter
,
debugstr_guid
(
riid
),
obj
);
...
...
@@ -118,11 +127,12 @@ IDirectDrawClassFactoryImpl_CreateInstance(IClassFactory *iface,
* IDirectDrawClassFactory::LockServer
*
*******************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClassFactoryImpl_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
static
HRESULT
WINAPI
IDirectDrawClassFactoryImpl_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
);
FIXME
(
"(%p)->(%d),stub!
\n
"
,
This
,
dolock
);
return
S_OK
;
}
...
...
@@ -287,7 +297,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
factory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
factory
));
if
(
factory
==
NULL
)
return
E_OUTOFMEMORY
;
factory
->
lpVtbl
=
&
IClassFactory_Vtbl
;
factory
->
IClassFactory_iface
.
lpVtbl
=
&
IClassFactory_Vtbl
;
factory
->
ref
=
1
;
factory
->
pfnCreateInstance
=
CreateDirectDrawFactory
;
...
...
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