Microsoft DirectX 8.0 (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 uses the IDirectMusicObject8::GetDescriptor method to obtain the name of a style:
// pStyle is a valid pointer to an IDirectMusicStyle8 interface. 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(); }