Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
68d5d33e
Commit
68d5d33e
authored
14 years ago
by
Michael Stefaniuc
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ddraw: COM cleanup for the IClassFactory iface.
parent
38f85c37
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/ddraw/ddraw_private.h
+0
-11
0 additions, 11 deletions
dlls/ddraw/ddraw_private.h
dlls/ddraw/main.c
+28
-18
28 additions, 18 deletions
dlls/ddraw/main.c
with
28 additions
and
29 deletions
dlls/ddraw/ddraw_private.h
+
0
−
11
View file @
68d5d33e
...
...
@@ -439,17 +439,6 @@ struct IDirectDrawPaletteImpl
HRESULT
ddraw_palette_init
(
IDirectDrawPaletteImpl
*
palette
,
IDirectDrawImpl
*
ddraw
,
DWORD
flags
,
PALETTEENTRY
*
entries
)
DECLSPEC_HIDDEN
;
/******************************************************************************
* DirectDraw ClassFactory implementation - incomplete
******************************************************************************/
typedef
struct
{
const
IClassFactoryVtbl
*
lpVtbl
;
LONG
ref
;
HRESULT
(
*
pfnCreateInstance
)(
IUnknown
*
pUnkOuter
,
REFIID
iid
,
LPVOID
*
ppObj
);
}
IClassFactoryImpl
;
/* Helper structures */
struct
object_creation_info
{
...
...
This diff is collapsed.
Click to expand it.
dlls/ddraw/main.c
+
28
−
18
View file @
68d5d33e
...
...
@@ -528,6 +528,23 @@ static const struct object_creation_info object_creation[] =
{
&
CLSID_DirectDrawClipper
,
CF_CreateDirectDrawClipper
}
};
/******************************************************************************
* 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
*
...
...
@@ -542,12 +559,10 @@ static const struct object_creation_info object_creation[] =
* Failure: E_NOINTERFACE
*
*******************************************************************************/
static
HRESULT
WINAPI
IDirectDrawClassFactoryImpl_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
obj
)
static
HRESULT
WINAPI
IDirectDrawClassFactoryImpl_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
obj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactory
Impl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_
IClassFactory
(
iface
)
;
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
...
...
@@ -572,10 +587,9 @@ IDirectDrawClassFactoryImpl_QueryInterface(IClassFactory *iface,
* The new refcount
*
*******************************************************************************/
static
ULONG
WINAPI
IDirectDrawClassFactoryImpl_AddRef
(
IClassFactory
*
iface
)
static
ULONG
WINAPI
IDirectDrawClassFactoryImpl_AddRef
(
IClassFactory
*
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactory
Impl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_
IClassFactory
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
This
,
ref
);
...
...
@@ -593,10 +607,9 @@ IDirectDrawClassFactoryImpl_AddRef(IClassFactory *iface)
* The new refcount
*
*******************************************************************************/
static
ULONG
WINAPI
IDirectDrawClassFactoryImpl_Release
(
IClassFactory
*
iface
)
static
ULONG
WINAPI
IDirectDrawClassFactoryImpl_Release
(
IClassFactory
*
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactory
Impl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_
IClassFactory
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
This
,
ref
);
...
...
@@ -620,13 +633,10 @@ IDirectDrawClassFactoryImpl_Release(IClassFactory *iface)
* ???
*
*******************************************************************************/
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
=
(
IClassFactory
Impl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_
IClassFactory
(
iface
)
;
TRACE
(
"iface %p, outer_unknown %p, riid %s, object %p.
\n
"
,
iface
,
UnkOuter
,
debugstr_guid
(
riid
),
obj
);
...
...
@@ -709,7 +719,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
=
object_creation
[
i
].
pfnCreateInstance
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment