Platform SDK: Fax Services |
A fax client application calls the FaxSendDocumentForBroadcast function to queue several fax jobs that will transmit the same outgoing fax transmission to several recipients. The function calls the FAX_RECIPIENT_CALLBACK function once for each designated fax recipient.
An application should call the FaxSendDocumentForBroadcast function to efficiently send a fax document to multiple recipients, rather than calling FaxSendDocument multiple times. This is because FaxSendDocumentForBroadcast stores the master document only once, using the same file for all outbound transmissions.
BOOL WINAPI FaxSendDocumentForBroadcast( HANDLE FaxHandle, // handle to the fax server LPCTSTR FileName, // fax document file name LPDWORD FaxJobId, // fax job identifier PFAX_RECIPIENT_CALLBACK FaxRecipientCallback, // pointer to fax recipient callback function LPVOID Context // pointer to context information );
This parameter can contain any valid local or remote file name. The file must be a properly registered file type, and the fax server must be able to access the file.
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 all of the FaxHandle, FileName, FaxRecipientCallback, or FaxJobId parameters are NULL. |
ERROR_FILE_NOT_FOUND | The fax server cannot locate the file specified by the FileName parameter. |
ERROR_INVALID_DATA | The fax server cannot render the file specified by the FileName parameter. |
ERROR_ACCESS_DENIED | Access is denied. FAX_JOB_SUBMIT access is required. |
The FaxSendDocumentForBroadcast function performs the following operations in the order indicated:
For more information, see Transmitting Faxes.
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.
Fax Service Client Application Programming Interface Overview, Fax Service Client API Functions, FaxSendDocument, FAX_RECIPIENT_CALLBACK, FaxConnectFaxServer