Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
After you have loaded an object, you can use its IDirectMusicObject8 interface to retrieve information about it in a DMUS_OBJECTDESC structure.
The following example function uses the IDirectMusicObject8::GetDescriptor method to obtain information about the name of a style :
void GetStyleName(IDirectMusicStyle8* pStyle)
{
IDirectMusicObject8 *pIObject;
DMUS_OBJECTDESC objDesc;
if (SUCCEEDED(pStyle->QueryInterface(IID_IDirectMusicObject8,
(void **) &pIObject)))
{
if (SUCCEEDED(pIObject->GetDescriptor(&objDesc)))
{
if (objDesc.dwValidData & DMUS_OBJ_NAME)
{
// Do something with objDesc.wszName,
// which now contains the name of the style.
}
}
pIObject->Release();
}
}