|Microsoft DirectX 9.0|
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.
HRESULT SetObject( LPDMUS_OBJECTDESC 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.
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.
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.
Header: Declared in dmusici.h.