Once you have loaded an object. you can use its IDirectMusicObject interface to retrieve information about it in a DMUS_OBJECTDESC structure. You must first obtain the IDirectMusicObject interface for the object.
The following example uses the IDirectMusicObject::GetDescriptor method to obtain the name of a style:
/* It is assumed that pStyle is a valid pointer to an
IDirectMusicStyle interface. */
if (pStyle)
{
IDirectMusicObject *pIObject;
DMUS_OBJECTDESC Desc;
if (SUCCEEDED(pStyle->QueryInterface(IID_IDirectMusicObject,
(void **) &pIObject)
{
if (SUCCEEDED(pIObject->GetDescriptor(&Desc))
{
if (Desc.dwValidData & DMUS_OBJ_NAME)
{
TRACE("Style name is %S\n",Desc.wszName);
}
}
pIObject->Release();
}
}