Platform SDK: Fax Services

FaxDevReceive

The fax service calls the FaxDevReceive function to signal an incoming fax transmission to the fax service provider. Each fax service provider must export the FaxDevReceive function.

BOOL WINAPI FaxDevReceive(
  HANDLE FaxHandle,        // fax handle
  HCALL CallHandle,        // TAPI call handle
  PFAX_RECEIVE FaxReceive  // pointer to receiving information structure
);

Parameters

FaxHandle
[in] Specifies a fax handle returned by the FaxDevStartJob function.
CallHandle
[in] Specifies a TAPI call handle. Note that the fax service provider should use this handle for all call operations, but should never close this handle.
FaxReceive
[in/out] Pointer to a FAX_RECEIVE structure that contains information about an incoming fax document. Upon return, the structure also contains the ReceiverName and ReceiverNumber members.

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 calls the FaxDevReceive function after a TAPI line device associated with the fax service provider rings, and the line is in the offering state. For information on call states, see State in the TAPI documentation.

The fax service provider must respond to the FaxDevReceive function by receiving the incoming fax document. The fax service provider must accept the incoming call through TAPI, and then receive the fax data stream. The fax service provider should store the data stream in the file specified by the FileName member of the FAX_RECEIVE structure that is passed into the FaxDevReceive function. This file is a Tagged Image File Format, Class F for facsimile (TIFF 6.0 Class F) file. For more information, see Fax Image Format.

The fax service provider should set the ReceiverName and ReceiverNumber members in the FAX_RECEIVE structure pointed to by the FaxReceive parameter. The fax service allocates the memory for these strings. The size of the memory the service allocates is equal to sizeof(FAX_RECEIVE) + FAXDEVRECEIVE_SIZE. The fax service provider must place the strings in the block of memory that follows the FAX_RECEIVE structure. The ReceiverName and ReceiverNumber members must point to the location of the strings in the memory block. For a code sample and diagram that illustrate how to fill in the memory that the fax service allocates, see FAX_RECEIVE.

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, FAX_RECEIVE, FaxDevStartJob, FaxDevSend