ICeFileFilterSite::OpenSourceFile

This method is called by a file filter to open a source file.

At a Glance

Header file: Replfilt.h
Windows CE versions: 2.0 and later

Syntax

STDMETHODIMP ICeFileFilterSite::OpenSourceFile(
int
nHowToOpenFile, LPVOID *ppObj );

Parameters

nHowToOpenFile

Specifies how the source file is to be opened. It is one of the following values:

Value Description
PF_OPENFLAT Open as a flat file.
PF_OPENCOMPOUND Open as an OLE compound file. Note that Windows CE does not support compound files.

ppObj

Pointer to an LPVOID variable that receives an IStream pointer if nHowToOpenFile is PF_OPENFLAT, or an IStorage pointer if nHowToOpenFile is PF_OPENCOMPOUND. This object must be released using the ICeFileFilterSite::CloseSourceFile method before returning to H/PC Explorer.

Return Values

NOERROR indicates success. An HRESULT_FROM_WIN32 error value indicates failure.

Remarks

The ICeFileFilterSite::OpenSourceFile method opens the file specifed by the CFF_SOURCEFILE structure. Windows CE Explorer passes a pointer to this structure in the call to the file filter’s ICeFileFilter::NextConvertFile method.

See Also

ICeFileFilter::NextConvertFile