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
a0e46698
Commit
a0e46698
authored
Jul 29, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmcompos: Merge the IClassFactory implementations.
parent
35979eb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
225 deletions
+61
-225
dmcompos_main.c
dlls/dmcompos/dmcompos_main.c
+61
-225
No files found.
dlls/dmcompos/dmcompos_main.c
View file @
a0e46698
...
...
@@ -29,260 +29,96 @@ static HINSTANCE instance;
LONG
DMCOMPOS_refCount
=
0
;
typedef
struct
{
const
IClassFactoryVtbl
*
lpVtbl
;
IClassFactory
IClassFactory_iface
;
HRESULT
WINAPI
(
*
fnCreateInstance
)(
REFIID
riid
,
void
**
ppv
,
IUnknown
*
pUnkOuter
);
}
IClassFactoryImpl
;
/******************************************************************
* DirectMusicChordMap ClassFactory
*/
static
HRESULT
WINAPI
ChordMapCF_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
ChordMapCF_AddRef
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
ChordMapCF_Release
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_UnlockModule
();
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
ChordMapCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
return
DMUSIC_CreateDirectMusicChordMapImpl
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
ChordMapCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMCOMPOS_LockModule
();
else
DMCOMPOS_UnlockModule
();
return
S_OK
;
}
static
const
IClassFactoryVtbl
ChordMapCF_Vtbl
=
{
ChordMapCF_QueryInterface
,
ChordMapCF_AddRef
,
ChordMapCF_Release
,
ChordMapCF_CreateInstance
,
ChordMapCF_LockServer
};
static
IClassFactoryImpl
ChordMap_CF
=
{
&
ChordMapCF_Vtbl
};
/******************************************************************
* DirectMusicComposer ClassFactory
*/
static
HRESULT
WINAPI
ComposerCF_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
ComposerCF_AddRef
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
ComposerCF_Release
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_UnlockModule
();
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
ComposerCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
return
DMUSIC_CreateDirectMusicComposerImpl
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
ComposerCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMCOMPOS_LockModule
();
else
DMCOMPOS_UnlockModule
();
static
HRESULT
WINAPI
create_direct_music_template
(
REFIID
riid
,
void
**
ppv
,
IUnknown
*
pUnkOuter
)
{
FIXME
(
"(%p, %s, %p) stub
\n
"
,
pUnkOuter
,
debugstr_dmguid
(
riid
),
ppv
);
return
S_OK
;
return
E_NOINTERFACE
;
}
static
const
IClassFactoryVtbl
ComposerCF_Vtbl
=
{
ComposerCF_QueryInterface
,
ComposerCF_AddRef
,
ComposerCF_Release
,
ComposerCF_CreateInstance
,
ComposerCF_LockServer
};
static
IClassFactoryImpl
Composer_CF
=
{
&
ComposerCF_Vtbl
};
/******************************************************************
*
DirectMusicChordMapTrack ClassFactory
*
IClassFactory implementation
*/
static
HRESULT
WINAPI
ChordMapTrackCF_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
ChordMapTrackCF_AddRef
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
ChordMapTrackCF_Release
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_UnlockModule
();
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
ChordMapTrackCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
return
DMUSIC_CreateDirectMusicChordMapTrack
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
ChordMapTrackCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMCOMPOS_LockModule
();
else
DMCOMPOS_UnlockModule
();
return
S_OK
;
static
inline
IClassFactoryImpl
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IClassFactoryImpl
,
IClassFactory_iface
);
}
static
const
IClassFactoryVtbl
ChordMapTrackCF_Vtbl
=
{
ChordMapTrackCF_QueryInterface
,
ChordMapTrackCF_AddRef
,
ChordMapTrackCF_Release
,
ChordMapTrackCF_CreateInstance
,
ChordMapTrackCF_LockServer
};
static
IClassFactoryImpl
ChordMapTrack_CF
=
{
&
ChordMapTrackCF_Vtbl
};
/******************************************************************
* DirectMusicTemplate ClassFactory
*/
static
HRESULT
WINAPI
TemplateCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
FIXME
(
"- no interface IID: %s
\n
"
,
debugstr_guid
(
riid
));
static
HRESULT
WINAPI
ClassFactory_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
ppv
==
NULL
)
return
E_POINTER
;
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
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
;
}
static
ULONG
WINAPI
TemplateCF_AddRef
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_LockModule
();
return
2
;
/* non-heap based object */
*
ppv
=
iface
;
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
TemplateCF_Release
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_UnlockModule
();
return
1
;
/* non-heap based object */
}
static
ULONG
WINAPI
ClassFactory_AddRef
(
IClassFactory
*
iface
)
{
DMCOMPOS_LockModule
();
static
HRESULT
WINAPI
TemplateCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
/* nothing yet */
WARN
(
"(%s,%p): not found
\n
"
,
debugstr_dmguid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
return
2
;
/* non-heap based object */
}
static
HRESULT
WINAPI
TemplateCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMCOMPOS_LockModule
();
else
DMCOMPOS_UnlockModule
();
static
ULONG
WINAPI
ClassFactory_Release
(
IClassFactory
*
iface
)
{
DMCOMPOS_UnlockModule
();
return
S_OK
;
return
1
;
/* non-heap based object */
}
static
const
IClassFactoryVtbl
TemplateCF_Vtbl
=
{
TemplateCF_QueryInterface
,
TemplateCF_AddRef
,
TemplateCF_Release
,
TemplateCF_CreateInstance
,
TemplateCF_LockServer
};
static
IClassFactoryImpl
Template_CF
=
{
&
TemplateCF_Vtbl
};
/******************************************************************
* DirectMusicSignPostTrack ClassFactory
*/
static
HRESULT
WINAPI
SignPostTrackCF_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
HRESULT
WINAPI
ClassFactory_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
{
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
);
static
ULONG
WINAPI
SignPostTrackCF_AddRef
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_LockModule
();
return
2
;
/* non-heap based object */
}
TRACE
(
"(%p, %s, %p)
\n
"
,
pUnkOuter
,
debugstr_dmguid
(
riid
),
ppv
);
static
ULONG
WINAPI
SignPostTrackCF_Release
(
LPCLASSFACTORY
iface
)
{
DMCOMPOS_UnlockModule
();
return
1
;
/* non-heap based object */
return
This
->
fnCreateInstance
(
riid
,
ppv
,
pUnkOuter
);
}
static
HRESULT
WINAPI
SignPostTrackCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
return
DMUSIC_CreateDirectMusicSignPostTrack
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
ClassFactory_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
{
TRACE
(
"(%d)
\n
"
,
dolock
);
static
HRESULT
WINAPI
SignPostTrackCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMCOMPOS_LockModule
();
else
DMCOMPOS_UnlockModule
();
if
(
dolock
)
DMCOMPOS_LockModule
();
else
DMCOMPOS_UnlockModule
();
return
S_OK
;
return
S_OK
;
}
static
const
IClassFactoryVtbl
SignPostTrackCF_V
tbl
=
{
SignPostTrackCF
_QueryInterface
,
SignPostTrackCF
_AddRef
,
SignPostTrackCF
_Release
,
SignPostTrackCF
_CreateInstance
,
SignPostTrackCF
_LockServer
static
const
IClassFactoryVtbl
classfactory_v
tbl
=
{
ClassFactory
_QueryInterface
,
ClassFactory
_AddRef
,
ClassFactory
_Release
,
ClassFactory
_CreateInstance
,
ClassFactory
_LockServer
};
static
IClassFactoryImpl
SignPostTrack_CF
=
{
&
SignPostTrackCF_Vtbl
};
static
IClassFactoryImpl
ChordMap_CF
=
{{
&
classfactory_vtbl
},
DMUSIC_CreateDirectMusicChordMapImpl
};
static
IClassFactoryImpl
Composer_CF
=
{{
&
classfactory_vtbl
},
DMUSIC_CreateDirectMusicComposerImpl
};
static
IClassFactoryImpl
ChordMapTrack_CF
=
{{
&
classfactory_vtbl
},
DMUSIC_CreateDirectMusicChordMapTrack
};
static
IClassFactoryImpl
Template_CF
=
{{
&
classfactory_vtbl
},
create_direct_music_template
};
static
IClassFactoryImpl
SignPostTrack_CF
=
{{
&
classfactory_vtbl
},
DMUSIC_CreateDirectMusicSignPostTrack
};
/******************************************************************
* 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