Platform SDK: Fax Services

FaxRouteMethod

The FaxRouteMethod function is a placeholder for a function name defined by the fax routing extension DLL. This function executes a defined fax routing procedure.

The fax routing extension DLL can export multiple fax routing methods. The fax routing extension must export one uniquely named FaxRouteMethod function for each fax routing method it exports. It is recommended that each function name describe the functionality of the particular fax routing method. The fax service calls the FaxRouteMethod functions, in order of priority, after the service receives a fax document.

BOOL WINAPI FaxRouteMethod(
  CONST FAX_ROUTE *FaxRoute,  // pointer to a fax routing structure
  PVOID *FailureData,         // pointer to the buffer with routing
                              //   retry information 
  LPDWORD FailureDataSize     // pointer to the buffer size, in bytes
);

Parameters

FaxRoute
[in] Pointer to a FAX_ROUTE structure that contains information about the received fax document.
FailureData
[out] Pointer to a variable that receives a pointer to a buffer that contains retry information for the fax routing method. This parameter can be equal to NULL. For more information, see the following Remarks section.
FailureDataSize
[out] Pointer to an unsigned DWORD variable that receives the size, in bytes, of the buffer pointed to by the FailureData parameter.

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

A fax routing method can manipulate the received Tagged Image File Format, Class F for facsimile (TIFF Class F) file. For example, one routing method could route the received TIFF file to a specific destination such as a printer, or deliver the file in an e-mail message to a user. Another routing method could convert the TIFF file to text using optical character recognition (OCR) technology, and then create a Microsoft Word document from the text. A fax routing method cannot delete or modify the TIFF file. For information about TIFF files, see Fax Image Format.

If you want the fax service to retry a failed routing method at a later time, the fax routing method must take the following steps.

To specify that the fax service retry a fax routing method

  1. Allocate a buffer to hold retry information for the fax routing method. The fax routing method must allocate the memory required for the buffer from the heap specified by the FaxRouteInitialize function.
  2. Fill the buffer with the information required to retry the fax routing method.
  3. Set the FailureData parameter to a valid pointer value.

For more information, see Registering a Fax Routing Method.

Requirements

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

See Also

Fax Routing Extension Application Programming Interface Overview, Fax Routing Extension Functions, FAX_ROUTE, FaxRouteAddFile, FaxRouteDeleteFile, FaxRouteGetFile, FaxRouteEnumFiles, FaxRouteModifyRoutingData, FaxRouteInitialize