Поделиться через


IDirectMusicLoader8 Interface

The IDirectMusicLoader8 interface is used for finding, enumerating, caching, and loading objects. For an overview, see Loading Audio Data.

This interface supersedes IDirectMusicLoader and adds support for garbage collection.

In addition to the methods inherited from IUnknown, the IDirectMusicLoader8 interface exposes the following methods.

Method Description
CacheObject Stores a reference to an object for later use, so that the object is not loaded more than once.
ClearCache Removes all saved references to a specified object type.
CollectGarbage Removes from the cache objects that are no longer in use.
EnableCache Enables or disables automatic caching of all objects loaded.
EnumObject Enumerates all available objects of the specified type.
GetObject Retrieves an object from a file or resource.
LoadObjectFromFile Retrieves an object from a file.
ReleaseObjectByUnknown Releases the loader's reference to an object.
ReleaseObject Releases the loader's reference to an object.
ScanDirectory Searches a directory or disk for all files of a specified class type and file name extension.
SetObject Enables the loader to find an object when it is later referenced by another object that is being loaded, and adds attributes to an object so that it can be identified by those attributes.
SetSearchDirectory Sets a search path for finding object files.

The LPDMUS_LOADER type is defined as a pointer to the IDirectMusicLoader interface:

typedef IDirectMusicLoader __RPC_FAR *LPDMUS_LOADER;

The following table lists the standard types of loadable objects, together with their class identifiers (the rguidClass parameter of various methods that deal with objects) and the usual file name extension.

Object type Class Extension
Audiopath CLSID_DirectMusicAudioPathConfig aud
Band CLSID_DirectMusicBand bnd
Container CLSID_DirectMusicContainer con
DLS collection CLSID_DirectMusicCollection dls
Chordmap CLSID_DirectMusicChordMap cdm
Segment CLSID_DirectMusicSegment sgt
Script CLSID_DirectMusicScript spt
Style CLSID_DirectMusicStyle sty
Template CLSID_DirectMusicSegment tpl
Toolgraph CLSID_DirectMusicGraph tgr
Wave CLSID_DirectSoundWave wav

Requirements

**  Header:** Dmusici.h
  Library: Dmloader.dll, Dmloaded.dll

See Also

© 2004 Microsoft Corporation. All rights reserved.