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
ef039627
Commit
ef039627
authored
Dec 05, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Use an iface instead of a vtbl pointer in IClassFactoryImpl.
parent
23906816
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
main.c
dlls/mmdevapi/main.c
+11
-6
No files found.
dlls/mmdevapi/main.c
View file @
ef039627
...
...
@@ -342,15 +342,20 @@ HRESULT WINAPI DllCanUnloadNow(void)
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
MMCF_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
;
...
...
@@ -382,7 +387,7 @@ static HRESULT WINAPI MMCF_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
)
...
...
@@ -398,7 +403,7 @@ static HRESULT WINAPI MMCF_CreateInstance(
static
HRESULT
WINAPI
MMCF_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
;
}
...
...
@@ -412,7 +417,7 @@ static const IClassFactoryVtbl MMCF_Vtbl = {
};
static
IClassFactoryImpl
MMDEVAPI_CF
[]
=
{
{
&
MMCF_Vtbl
,
&
CLSID_MMDeviceEnumerator
,
(
FnCreateInstance
)
MMDevEnum_Create
}
{
{
&
MMCF_Vtbl
}
,
&
CLSID_MMDeviceEnumerator
,
(
FnCreateInstance
)
MMDevEnum_Create
}
};
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
)
...
...
@@ -436,7 +441,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
for
(
i
=
0
;
i
<
sizeof
(
MMDEVAPI_CF
)
/
sizeof
(
MMDEVAPI_CF
[
0
]);
++
i
)
{
if
(
IsEqualGUID
(
rclsid
,
MMDEVAPI_CF
[
i
].
rclsid
))
{
IUnknown_AddRef
(
(
IClassFactory
*
)
&
MMDEVAPI_CF
[
i
]
);
IUnknown_AddRef
(
&
MMDEVAPI_CF
[
i
].
IClassFactory_iface
);
*
ppv
=
&
MMDEVAPI_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