IDirectMusicLoader8::SetObject
The SetObject method 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.
Syntax
HRESULT SetObject(
LPDMUS_OBJECTDESC pDesc
);
Parameters
pDesc
Address of a DMUS_OBJECTDESC structure describing the object. On entry, this structure contains any information the application has about the object. On return, it can contain additional information.
Return Values
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the error values shown in the following table.
Return code |
DMUS_E_LOADER_FAILEDCREATE |
DMUS_E_LOADER_FAILEDOPEN |
DMUS_E_LOADER_FORMATNOTSUPPORTED |
DMUS_E_LOADER_NOCLASSID |
E_FAIL |
E_INVALIDARG |
E_OUTOFMEMORY |
E_POINTER |
REGDB_E_CLASSNOTREG |
Remarks
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, the method cannot be used to change existing attributes. Most authored segments, for example, already have names, and these cannot be changed by the application.
Requirements
** Header:** Dmusici.h
Library: Dmloader.dll, Dmloaded.dll
See Also