DMUS_OBJECTDESC
The DMUS_OBJECTDESC structure is used to describe a DirectMusic object. It is passed to the IDirectMusicLoader::GetObject method to identify the object that the loader should retrieve from storage. Information about an object is retrieved in this structure by the IDirectMusicLoader::EnumObject and IDirectMusicObject::GetDescriptor methods.
typedef struct _DMUS_OBJECTDESC {
DWORD dwSize;
DWORD dwValidData;
GUID guidObject;
GUID guidClass;
FILETIME ftDate;
DMUS_VERSION vVersion;
WCHAR wszName[DMUS_MAX_NAME];
WCHAR wszCategory[DMUS_MAX_CATEGORY];
WCHAR wszFileName[DMUS_MAX_FILENAME];
LONGLONG llMemLength;
PBYTE pbMemData;
} DMUS_OBJECTDESC, *LPDMUS_OBJECTDESC;
Members
- dwSize
- Size of the structure, in bytes. This member must be initialized to sizeof(DMUS_OBJECTDESC) before the structure is passed to any method.
- dwValidData
- Flags describing which members are valid, and giving further information about some members. The following values are defined:
- DMUS_OBJ_OBJECT
- The guidObject member is valid.
- DMUS_OBJ_CLASS
- The guidClass member is valid.
- DMUS_OBJ_NAME
- The wszName member is valid.
- DMUS_OBJ_CATEGORY
- The wszCategory member is valid.
- DMUS_OBJ_FILENAME
- The wszFileName member is valid.
- DMUS_OBJ_FULLPATH
- The wszFileName member contains the full path. If this flag is set, the loader assumes that wszFileName is valid even if DMUS_OBJ_FILENAME has not been set.
- DMUS_OBJ_MEMORY
- The object is in memory, and llMemLength and pbMemData are valid.
- DMUS_OBJ_URL
- The wszFileName member contains an URL. (URLs are not currently supported by the DirectMusic loader.)
- DMUS_OBJ_VERSION
- The vVersion member is valid.
- DMUS_OBJ_DATE
- The ftDate member is valid.
- DMUS_OBJ_LOADED
- Object is currently loaded in memory.
- guidObject
- Unique identifier for this object.
- guidClass
- Unique identifier for the class of object. All the standard objects have defined identifiers consisting of "CLSID_" plus the name of the object. For example, a segment object is identified as CLSID_DirectMusicSegment. See the defines in Dmusici.h.
- ftDate
- Last edited date of object.
- vVersion
- DMUS_VERSION structure containing version information.
- wszName
- Name of object.
- wszCategory
- Category for object.
- wszFileName
- File path. If DMUS_OBJ_FULLPATH is set, this is the full path; otherwise it is just the file name.
- llMemLength
- Size of data in memory.
- pbMemData
- Data in memory.
Remarks
At least one of wszName, guidObject, and wszFileName must be filled with valid data in order to retrieve the object by using the IDirectMusicLoader::GetObject method.
The name and category strings use 16-bit characters in the WCHAR format, not 8-bit ANSI chars. Be sure to convert as appropriate. You can use the C library routine mbstowcs to convert from multibyte to Unicode and wcstombs to convert from Unicode back to multibyte.
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.
See Also
Enumerating Objects, Loading Objects, Getting Object Descriptors