IPegasusFileFilterSite::ReportLoss

This method is called by a file filter to report any information that it intentionally discarded during a file conversion. The file filter specifies a message that explains the data loss, and H/PC Explorer formats and displays the message in a message box when the file conversion is complete. The file filter can specify either the identifier of a message table resource, or the address of a buffer that contains the message string.

At a Glance

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

Syntax

STDMETHODIMP IPegasusFileFilterSite::ReportLoss( DWORD dw,
LPCTSTR psz, va_list * Arguments );

Parameters

dw

Specifies a 32-bit message identifier. ReportLoss uses IPegasusFileFilter::FormatMessage to format the message. If the format fails—for example, the message identifier could not be recognized—then the system function FormatMessage is used.

psz

Pointer to the null-terminated message string to display. This parameter should be NULL if the dw parameter is used.

Arguments

Pointer to an array of 32-bit values that are used as insert values in the formatted message. %1 in the format string indicates the first value in the Arguments array, %2 indicates the second argument, and so on.

Return Values

None.

Remarks

The interpretation of each 32-bit value depends on the formatting information associated with the insert in the message definition. The default is to treat each value as a pointer to a null-terminated string. By default, the Arguments parameter is of type va_list*, which is a language- and implementation-specific data type for describing a variable number of arguments.

If the Win32 error value—passed in the dw parameter of the IPegasusFileFilterSite::ReportLoss method—to be formatted with FormatMessage is not NULL, then the H/PC Explorer first calls the file filter’s IPegasusFileFilter::FormatMessage method—that is, in the current module—to request a description of the error. If the file filter’s FormatMessage fails, then the H/PC Explorer attempts to identify the error using the system FormatMessage call.

If dw is NULL, then the strings passed in the psz and Arguments parameters are reported in a message by the H/PC Explorer when the file conversion is complete. Note that only one of the parameters dw or psz should not be NULL. That is, either a message identifier or a message string may be passed in the call to ReportLoss.