Microsoft DirectX 8.0 (C++) |
Retrieves the specified object from a file and returns the desired interface. This method can be used instead of IDirectMusicLoader8::GetObject when the object is in a file.
HRESULT LoadObjectFromFile( REFGUID rguidClassID, REFIID iidInterfaceID, WCHAR *pwzFilePath, void ** ppObject );
If the method succeeds, the return value is S_OK or DMUS_S_PARTIALLOAD.
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 |
DMUS_S_PARTIALLOAD is returned if any referenced object cannot be found, such as a style referenced in a segment. The loader might fail to find the style if it is referenced by name but IDirectMusicLoader8::ScanDirectory has not been called for styles. DMUS_S_PARTIALLOAD might also mean that the default instrument collection file, Gm.dls, is not available.
Header: Declared in dmusici.h.
IDirectMusicLoader8::GetObject, IDirectMusicLoader8::SetSearchDirectory