Platform SDK: Fax Services

FaxPrintCoverPage

The FaxPrintCoverPage function prints a fax transmission cover page to the specified device context for a fax client application. The cover page can be a personal cover page stored on the local computer, or it can be a common cover page stored on the fax server.

BOOL WINAPI FaxPrintCoverPage(
  CONST FAX_CONTEXT_INFO *FaxContextInfo,
                         // pointer to device context structure
  CONST FAX_COVERPAGE_INFO *CoverPageInfo 
                         // pointer to local cover page structure
);

Parameters

FaxContextInfo
[in] Pointer to a FAX_CONTEXT_INFO structure that contains a handle to a fax printer device context.
CoverPageInfo
[in] Pointer to a FAX_COVERPAGE_INFO structure that contains personal data to display on the cover page of the fax document.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError. GetLastError can return one of the following errors.

Error code Description
ERROR_INVALID_PARAMETER One or both of the CoverPageInfo or FaxContextInfo parameters are NULL.
ERROR_INVALID_PARAMETER The SizeOfStruct member of the specified FAX_COVERPAGE_INFO structure is not equal to sizeof(FAX_COVERPAGE_INFO); or the SizeOfStruct member of the specified FAX_CONTEXT_INFO structure is not equal to sizeof(FAX_CONTEXT_INFO).
ERROR_FILE_NOT_FOUND The fax server cannot locate the file specified by the CoverPageName member of the FAX_COVERPAGE_INFO structure.

Remarks

A fax client application must call the FaxStartPrintJob function before calling the FaxPrintCoverPage function to print a cover page with a fax job. For more information, see Cover Pages and Printing a Fax to a Device Context.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable with BackOffice Small Business Server.
  Header: Declared in Winfax.h.
  Library: Included as a resource in Winfax.dll.
  Unicode: Implemented as Unicode and ANSI versions on all platforms.

See Also

Fax Service Client Application Programming Interface Overview, Fax Service Client API Functions, FaxStartPrintJob, FAX_COVERPAGE_INFO, FAX_CONTEXT_INFO