Microsoft DirectX 8.1 (C++)

IDirectXFile::CreateEnumObject

Creates an enumerator object.

HRESULT CreateEnumObject(
  LPVOID pvSource,
  DXFILELOADOPTIONS dwLoadOptions,
  LPDIRECTXFILEENUMOBJECT* ppEnumObj
);

Parameters

pvSource
[out] Pointer to data whose contents depend on the value of dwLoadOptions
dwLoadOptions
[in] Value that specifies the source of the data. This value can be one of the following flags.
DXFILELOAD_FROMFILE
Indicates data read from a file, so the value in pvSource is the name of the file.
DXFILELOAD_FROMRESOURCE
Indicates data read from a resource, so the value in pvSource is a DXFILELOADRESOURCE structure.
DXFILELOAD_FROMMEMORY
Indicates data read from memory, so the value in pvSource is a DXFILELOADMEMORY structure.
DXFILELOAD_FROMSTREAM
Indicates data read from a stream. Not currently supported.
DXFILELOAD_FROMURL
Indicates data read from a URL, so the value in pvSource is the name of the URL.
ppEnumObj
[out] Address of a pointer to an IDirectXFileEnumObject interface, representing the created enumerator object.

Return Values

If the method succeeds, the return value is DXFILE_OK.

If the method fails, the return value can be one of the following values.

DXFILEERR_BADALLOC
DXFILEERR_BADFILEFLOATSIZE
DXFILEERR_BADFILETYPE
DXFILEERR_BADFILEVERSION
DXFILEERR_BADRESOURCE
DXFILEERR_BADVALUE
DXFILEERR_FILENOTFOUND
DXFILEERR_RESOURCENOTFOUND
DXFILEERR_URLNOTFOUND

Remarks

After using this method, use one of the IDirectXFileEnumObject methods to retrieve a data object.

Requirements

  Header: Declared in Dxfile.h.
  Import Library: Use D3dxof.lib.

See Also

IDirectXFileEnumObject