Platform SDK: Fax Services

FaxDevSend

The fax service calls the FaxDevSend function to signal a fax service provider that it must initiate an outgoing fax transmission. Each fax service provider must export the FaxDevSend function.

BOOL WINAPI FaxDevSend(
  HANDLE FaxHandle,      // fax handle
  PFAX_SEND FaxSend,     // pointer to sending information structure
  PFAX_SEND_CALLBACK FaxSendCallback 
                         // pointer to callback function
);

Parameters

FaxHandle
[in] Specifies a fax handle returned by the FaxDevStartJob function.
FaxSend
[in] Pointer to a FAX_SEND structure that contains the sending information. For more information, see the following Remarks section.
FaxSendCallback
[in] Pointer to a callback function that notifies the fax service of the call handle that TAPI assigns. For more information, see the following Remarks section.

Return Values

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero. To get extended error information, the fax service calls GetLastError.

Remarks

The fax service provider must respond to the FaxDevSend function by making the call, sending the data, and terminating the call. If the CallHandle member of the FAX_SEND structure is specified, the fax service provider should transmit the fax using the existing line connection instead of initiating a new call. The provider must call the lineSetMediaMode function to correctly set the call's media mode. If the CallHandle member is NULL, the fax service provider must dial the number specified by the ReceiverNumber member of the FAX_SEND structure.

The fax service provider has ownership of the line while in the context of the FaxDevSend function, and it must handle all protocol and error correction.

The data stream stored in the file specified by the FileName member of the FAX_SEND structure is a Tagged Image File Format, Class F for facsimile (TIFF 6.0 Class F) file. For more information, see Fax Image Format.

To notify the fax service that a call has been established, the fax service provider must call the FAX_SEND_CALLBACK function pointed to by the FaxSendCallback parameter. The callback function also provides the fax service with the call handle that TAPI assigns. This handle is necessary for TAPI message routing. If the fax service provider does not call FAX_SEND_CALLBACK, it will miss all call-specific events for the send operation.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in faxdev.h.
  Import Library: User-defined.

See Also

Fax Service Provider Application Programming Interface Overview, Fax Service Provider Functions, FaxDevStartJob, FAX_SEND, FaxDevReceive, FAX_SEND_CALLBACK