IAVIFile::Open

The Open method initializes a file handler. Called when an application uses the AVIFileOpen function.

HRESULT Open(
  PAVISTREAM pf,  
  LPCSTR szFile,  
  UINT mode       
);

Parameters

pf

Pointer to a buffer that receives a pointer to the interface to a file.

szFile

Pointer to a null-terminated string that contains the filename.

mode

Flags for the open operation.

Return Values

Returns the HRESULT defined by OLE.

Remarks

This method is always the first method called, regardless of whether your application is reading or writing a file.

For handlers written in C++, Open has the following syntax:

HRESULT Open(LPCSTR szFile, UINT mode); 
 

Requirements

**  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

Custom File and Stream Handlers, Custom File and Stream Handler Interfaces, AVIFileOpen