The AVIFileGetStream function returns the address of a stream interface that is associated with a specified AVI file.

STDAPI AVIFileGetStream(
  PAVIFILE pfile,      
  PAVISTREAM * ppavi,  
  DWORD fccType,       
  LONG lParam          



Handle to an open AVI file.


Pointer to the new stream interface.


Four-character code indicating the type of stream to open. Zero indicates any stream can be opened. The following definitions apply to the data commonly found in AVI streams.

Value Description
streamtypeAUDIO Indicates an audio stream.
streamtypeMIDI Indicates a MIDI stream.
streamtypeTEXT Indicates a text stream.
streamtypeVIDEO Indicates a video stream.


Count of the stream type. Identifies which occurrence of the specified stream type to access.

Return Values

Returns zero if successful or an error otherwise. Possible error values include the following.

Value Description
AVIERR_NODATA The file does not contain a stream corresponding to the values of fccType and lParam.
AVIERR_MEMORY Not enough memory.


The argument pfile is a pointer to an IAVIFile interface. The argument ppavi is a pointer to an IAVIStream interface.


  Windows NT/2000/XP: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Vfw.h.
  Library: Use Vfw32.lib.

See Also

AVIFile Functions and Macros, AVIFile Functions