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
d2e90cdd
Commit
d2e90cdd
authored
Dec 05, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Use an iface instead of a vtbl pointer in IClassFactoryImpl.
parent
751a4fe9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
dsound_main.c
dlls/dsound/dsound_main.c
+17
-12
No files found.
dlls/dsound/dsound_main.c
View file @
d2e90cdd
...
...
@@ -506,15 +506,20 @@ DirectSoundCaptureEnumerateW(
typedef
HRESULT
(
*
FnCreateInstance
)(
REFIID
riid
,
LPVOID
*
ppobj
);
typedef
struct
{
const
IClassFactoryVtbl
*
lpVtbl
;
IClassFactory
IClassFactory_iface
;
REFCLSID
rclsid
;
FnCreateInstance
pfnCreateInstance
;
}
IClassFactoryImpl
;
static
inline
IClassFactoryImpl
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IClassFactoryImpl
,
IClassFactory_iface
);
}
static
HRESULT
WINAPI
DSCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
ppobj
==
NULL
)
return
E_POINTER
;
...
...
@@ -546,7 +551,7 @@ static HRESULT WINAPI DSCF_CreateInstance(
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
if
(
pOuter
)
...
...
@@ -562,7 +567,7 @@ static HRESULT WINAPI DSCF_CreateInstance(
static
HRESULT
WINAPI
DSCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
FIXME
(
"(%p, %d) stub!
\n
"
,
This
,
dolock
);
return
S_OK
;
}
...
...
@@ -576,13 +581,13 @@ static const IClassFactoryVtbl DSCF_Vtbl = {
};
static
IClassFactoryImpl
DSOUND_CF
[]
=
{
{
&
DSCF_Vtbl
,
&
CLSID_DirectSound
,
(
FnCreateInstance
)
DSOUND_Create
},
{
&
DSCF_Vtbl
,
&
CLSID_DirectSound8
,
(
FnCreateInstance
)
DSOUND_Create8
},
{
&
DSCF_Vtbl
,
&
CLSID_DirectSoundCapture
,
(
FnCreateInstance
)
DSOUND_CaptureCreate
},
{
&
DSCF_Vtbl
,
&
CLSID_DirectSoundCapture8
,
(
FnCreateInstance
)
DSOUND_CaptureCreate8
},
{
&
DSCF_Vtbl
,
&
CLSID_DirectSoundFullDuplex
,
(
FnCreateInstance
)
DSOUND_FullDuplexCreate
},
{
&
DSCF_Vtbl
,
&
CLSID_DirectSoundPrivate
,
(
FnCreateInstance
)
IKsPrivatePropertySetImpl_Create
},
{
NULL
,
NULL
,
NULL
}
{
{
&
DSCF_Vtbl
}
,
&
CLSID_DirectSound
,
(
FnCreateInstance
)
DSOUND_Create
},
{
{
&
DSCF_Vtbl
}
,
&
CLSID_DirectSound8
,
(
FnCreateInstance
)
DSOUND_Create8
},
{
{
&
DSCF_Vtbl
}
,
&
CLSID_DirectSoundCapture
,
(
FnCreateInstance
)
DSOUND_CaptureCreate
},
{
{
&
DSCF_Vtbl
}
,
&
CLSID_DirectSoundCapture8
,
(
FnCreateInstance
)
DSOUND_CaptureCreate8
},
{
{
&
DSCF_Vtbl
}
,
&
CLSID_DirectSoundFullDuplex
,
(
FnCreateInstance
)
DSOUND_FullDuplexCreate
},
{
{
&
DSCF_Vtbl
}
,
&
CLSID_DirectSoundPrivate
,
(
FnCreateInstance
)
IKsPrivatePropertySetImpl_Create
},
{
{
NULL
}
,
NULL
,
NULL
}
};
/*******************************************************************************
...
...
@@ -622,7 +627,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
while
(
NULL
!=
DSOUND_CF
[
i
].
rclsid
)
{
if
(
IsEqualGUID
(
rclsid
,
DSOUND_CF
[
i
].
rclsid
))
{
DSCF_AddRef
(
(
IClassFactory
*
)
&
DSOUND_CF
[
i
]
);
DSCF_AddRef
(
&
DSOUND_CF
[
i
].
IClassFactory_iface
);
*
ppv
=
&
DSOUND_CF
[
i
];
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