Microsoft DirectX 8.0 (C++) |
Specialized applications might create their own object types that encapsulate data from a file or resource. It can be convenient to have the DirectMusic loader handle the loading of such objects. This is especially true if the custom object is referenced by other objects or contains references to other objects.
To implement a loading mechanism that takes advantage of the DirectMusic loader, take the following steps:
It might happen that an application needs to manage file input itself—for example, because all objects are stored in a special compressed resource file. The application can create its own loader by creating an object that supports the IDirectMusicLoader8 interface, with the IDirectMusicLoader8::GetObject method implemented. All other methods are optional. This implementation of the loader must also create its own stream object that has both the IStream and the IDirectMusicGetLoader8 interfaces.