Platform SDK: DirectX |
The IDirectMusicLoader::SetObject method tells the loader where to find an object when it is later referenced by another object being loaded, and adds attributes to an object so that it can be referred to by those attributes. For an overview, see Setting Objects.
HRESULT SetObject( LPDMUS_OBJECTDESC pDESC );
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the following error values:
E_FAIL |
E_INVALIDARG |
E_OUTOFMEMORY |
E_POINTER |
DMUS_E_LOADER_NOCLASSID |
DMUS_E_LOADER_FAILEDOPEN |
DMUS_E_LOADER_FAILEDCREATE |
DMUS_E_LOADER_FORMATNOTSUPPORTED |
REGDB_E_CLASSNOTREG |
This method can be used to set attributes that are not currently valid for an object. For example, you can supply a value in the wszName member of the DMUS_OBJECTDESC structure to assign an internal name to an unnamed object, such as a segment based on a MIDI file. However, it cannot be used to change existing attributes. Most authored segments, for example, already have names, and these cannot be changed by the application.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dmusici.h.