FaxPrintCoverPageA function (winfax.h)

The FaxPrintCoverPage function prints a fax transmission cover page to the specified device context for a fax client application.

Syntax

WINFAXAPI BOOL FaxPrintCoverPageA(
  [in] const FAX_CONTEXT_INFOA   *FaxContextInfo,
  [in] const FAX_COVERPAGE_INFOA *CoverPageInfo
);

Parameters

[in] FaxContextInfo

Type: const FAX_CONTEXT_INFO*

Pointer to a FAX_CONTEXT_INFO structure that contains a handle to a fax printer device context.

[in] CoverPageInfo

Type: const FAX_COVERPAGE_INFO*

Pointer to a FAX_COVERPAGE_INFO structure that contains personal data to display on the cover page of the fax document.

Return value

Type: BOOL

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.

Return 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 device context handle is obtained by using the FaxStartPrintJob function.

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.

Note  The application must also call the AbortDoc function or the EndDoc function to complete the print job, and call the DeleteDC function to deallocate the handle to the printer device context. For more information, see Printing a Fax to a Device Context.
 
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.

Note

The winfax.h header defines FaxPrintCoverPage as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winfax.h
Library WinFax.lib

See also

FAX_CONTEXT_INFO

FAX_COVERPAGE_INFO

Fax Service Client API Functions

Fax Service Client API for Windows 2000

FaxStartPrintJob