Microsoft DirectX 8.1 (C++) |
Once you have loaded an object, you can use its IDirectMusicObject8 interface to retrieve information about it in a DMUS_OBJECTDESC structure.
The following code example, in which pStyle is a valid pointer to an IDirectMusicStyle8 interface, uses the IDirectMusicObject8::GetDescriptor method to obtain the name of a
IDirectMusicObject8 *pIObject;
DMUS_OBJECTDESC Desc;
if (SUCCEEDED(pStyle->QueryInterface(IID_IDirectMusicObject8,
(void **) &pIObject)))
{
if (SUCCEEDED(pIObject->GetDescriptor(&Desc)))
{
if (Desc.dwValidData & DMUS_OBJ_NAME)
{
// Desc.wszName contains the name of the style.
}
}
pIObject->Release();
}