Microsoft DirectX 9.0 SDK Update (October 2004) |
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
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();
}
}