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
2cfc711a
Commit
2cfc711a
authored
Aug 01, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmband: Merge the IClassFactory implementations.
parent
faa05713
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
81 deletions
+54
-81
dmband_main.c
dlls/dmband/dmband_main.c
+54
-81
No files found.
dlls/dmband/dmband_main.c
View file @
2cfc711a
...
...
@@ -26,111 +26,84 @@ static HINSTANCE instance;
LONG
DMBAND_refCount
=
0
;
typedef
struct
{
const
IClassFactoryVtbl
*
lpVtbl
;
IClassFactory
IClassFactory_iface
;
HRESULT
WINAPI
(
*
fnCreateInstance
)(
REFIID
riid
,
void
**
ppv
,
IUnknown
*
pUnkOuter
);
}
IClassFactoryImpl
;
/******************************************************************
*
DirectMusicBand ClassFactory
*
IClassFactory implementation
*/
static
HRESULT
WINAPI
BandCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
FIXME
(
"- no interface IID: %s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
BandCF_AddRef
(
LPCLASSFACTORY
iface
)
{
DMBAND_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
BandCF_Release
(
LPCLASSFACTORY
iface
)
{
DMBAND_UnlockModule
();
return
1
;
/* non-heap based object */
static
inline
IClassFactoryImpl
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IClassFactoryImpl
,
IClassFactory_iface
);
}
static
HRESULT
WINAPI
BandCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
return
DMUSIC_CreateDirectMusicBandImpl
(
riid
,
ppobj
,
pOuter
);
static
HRESULT
WINAPI
ClassFactory_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
ppv
==
NULL
)
return
E_POINTER
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
iface
,
ppv
);
else
if
(
IsEqualGUID
(
&
IID_IClassFactory
,
riid
))
TRACE
(
"(%p)->(IID_IClassFactory %p)
\n
"
,
iface
,
ppv
);
else
{
FIXME
(
"(%p)->(%s %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
*
ppv
=
iface
;
IClassFactory_AddRef
(
iface
);
return
S_OK
;
}
static
HRESULT
WINAPI
BandCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
TRACE
(
"(%d)
\n
"
,
dolock
);
static
ULONG
WINAPI
ClassFactory_AddRef
(
IClassFactory
*
iface
)
{
DMBAND_LockModule
();
if
(
dolock
)
DMBAND_LockModule
();
else
DMBAND_UnlockModule
();
return
S_OK
;
return
2
;
/* non-heap based object */
}
static
const
IClassFactoryVtbl
BandCF_Vtbl
=
{
BandCF_QueryInterface
,
BandCF_AddRef
,
BandCF_Release
,
BandCF_CreateInstance
,
BandCF_LockServer
};
static
IClassFactoryImpl
Band_CF
=
{
&
BandCF_Vtbl
};
/******************************************************************
* DirectMusicBandTrack ClassFactory
*/
static
HRESULT
WINAPI
BandTrackCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
FIXME
(
"- no interface IID: %s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
static
ULONG
WINAPI
ClassFactory_Release
(
IClassFactory
*
iface
)
{
DMBAND_UnlockModule
();
return
E_NOINTERFACE
;
return
1
;
/* non-heap based object */
}
static
ULONG
WINAPI
BandTrackCF_AddRef
(
LPCLASSFACTORY
iface
)
{
DMBAND_LockModule
();
return
2
;
/* non-heap based object */
}
static
HRESULT
WINAPI
ClassFactory_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
{
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
);
static
ULONG
WINAPI
BandTrackCF_Release
(
LPCLASSFACTORY
iface
)
{
DMBAND_UnlockModule
();
TRACE
(
"(%p, %s, %p)
\n
"
,
pUnkOuter
,
debugstr_dmguid
(
riid
),
ppv
);
return
1
;
/* non-heap based object */
return
This
->
fnCreateInstance
(
riid
,
ppv
,
pUnkOuter
);
}
static
HRESULT
WINAPI
BandTrackCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
return
DMUSIC_CreateDirectMusicBandTrack
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
ClassFactory_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
{
TRACE
(
"(%d)
\n
"
,
dolock
);
static
HRESULT
WINAPI
BandTrackCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMBAND_LockModule
();
else
DMBAND_UnlockModule
();
if
(
dolock
)
DMBAND_LockModule
();
else
DMBAND_UnlockModule
();
return
S_OK
;
return
S_OK
;
}
static
const
IClassFactoryVtbl
BandTrackCF_V
tbl
=
{
BandTrackCF
_QueryInterface
,
BandTrackCF
_AddRef
,
BandTrackCF
_Release
,
BandTrackCF
_CreateInstance
,
BandTrackCF
_LockServer
static
const
IClassFactoryVtbl
classfactory_v
tbl
=
{
ClassFactory
_QueryInterface
,
ClassFactory
_AddRef
,
ClassFactory
_Release
,
ClassFactory
_CreateInstance
,
ClassFactory
_LockServer
};
static
IClassFactoryImpl
BandTrack_CF
=
{
&
BandTrackCF_Vtbl
};
static
IClassFactoryImpl
Band_CF
=
{{
&
classfactory_vtbl
},
DMUSIC_CreateDirectMusicBandImpl
};
static
IClassFactoryImpl
BandTrack_CF
=
{{
&
classfactory_vtbl
},
DMUSIC_CreateDirectMusicBandTrack
};
/******************************************************************
* DllMain
...
...
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