Share via


ICeFileFilter::NextConvertFile

The NextConvertFile method is called by Windows CE Services when the user selects a conversion type from the conversion selection dialog box for Windows CE Services.

Syntax

HRESULT NextConvertFile (
  int nConversion,
  CFF_CONVERTINFO * pci,
  CFF_SOURCEFILE * psf,
  CFF_DESTINATIONFILE * pdf,
  volatile BOOL * pbCancel,
  CF_ERROR * perr
);

Parameters

  • nConversion
    [in] Specifies a counter for converting a single source file into multiple destination files.
  • pci
    [in] Reference to a CFF_CONVERTINFO structure.
  • psf
    [in] Reference to a CFF_SOURCEFILE structure that contains information about the source file.
  • pdf
    [in] Reference to a CFF_DESTINATIONFILE structure that contains information about the destination file.
  • pbCancel
    [in] Reference to a Boolean; TRUE if the user cancels the file conversion before it is completed and FALSE otherwise.
  • perr
    [out] Reference to a filter-defined error value that can be passed by the Windows CE Services application to the ICeFileFilter::FormatMessage method. This error value is ignored unless the return value from NextConvertFile is E_FAIL.

Return Values

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:

  • S_OK
    The method completed successfully.
    HRESULT_FROM_WIN32(ERROR_CANCELLED)
    The user canceled the conversion.
  • HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS)
    The conversion or last subconversion was successful. End calls to NextConvertFile.
  • E_FAIL
    The perr value is not ignored.

Remarks

nConversion is zero the first time the method is called and is incremented for each successive call.

Because pbCancel is updated asynchronously by another thread, its contents can change at any time. A file filter must check this variable regularly during the conversion process and return ERROR_CANCELLED, after cleaning up, when pbCancel is set to TRUE.

Windows CE Services calls NextConvertFile repeatedly, incrementing the nConversion parameter, until the return value is ERROR_NO_MORE_ITEMS. If this method is successful, a simple file filter should return S_OK the first time this method is called and thereafter return HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS).

Requirements

Smartphone: Windows Mobile 2002 and later
OS Versions: Windows CE 3.0 and later
Header: replfilt.h

See Also

CFF_CONVERTINFO

CFF_SOURCEFILE

CFF_DESTINATIONFILE

ICeFileFilter

ICeFileFilter::FormatMessage

ICeFileFilterSite

Last updated on Friday, April 22, 2005

© 2005 Microsoft Corporation. All rights reserved.

Send feedback on this topic to the authors.