IMAPIViewAdviseSink::OnPrint
The IMAPIViewAdviseSink::OnPrint
method notifies a form viewer of the printing status of a form.
Quick Info
See IMAPIViewAdviseSink
: IUnknown
HRESULT OnPrint(
ULONG dwPageNumber, |
|
HRESULT hrStatus |
|
) |
|
Parameters
dwPageNumber
[in] Number
of the last page printed.
hrStatus
[in] An
HRESULT data type whose value shows the status of the print job. The following
values can be used to indicate status:
S_FALSE
The printing
job has finished successfully.
S_OK
The printing
job is in progress.
FAILED
The printing
job was terminated due to a failure.
Return Values
S_OK
The call
succeeded and has returned the expected value or values.
MAPI_E_USER_CANCEL
The user canceled
the operation, typically by clicking the Cancel button in a dialog box.
Remarks
Form objects
call the IMAPIViewAdviseSink::OnPrint method while printing to inform
the current view of printing progress. If the printing job involves multiple
pages, OnPrint can be called after each page is printed with the page
number for the last page printed in the dwPageNumber parameter and S_OK
in the hrStatus parameter to indicate that the printing job is
proceeding. When the printing job is complete, OnPrint should be called
with the page number of the last page printed in dwPageNumber and
S_FALSE in hrStatus.
For
information about implementing the interfaces related to form servers, see MAPI
Form Interfaces Used by Client Applications