Platform SDK: Fax Services

IFaxRoutingMethod

The IFaxRoutingMethod dual interface is used by a fax client application to retrieve fax routing configuration information for a fax port on a connected fax server. A FaxRoutingMethods object is a collection of FaxRoutingMethod objects.

The IFaxRoutingMethod interface includes the following interface methods:

A routing method is an action that is performed each time a fax is received on a port. If fax reception is not enabled on a port, the fax service disregards the routing methods associated with the port. Only enabled routing methods are executed when a fax is received.

When to Implement

You should not implement this interface. The Microsoft® standard implementation provides complete functionality.

When to Use

Use the IFaxRoutingMethod interface to enable or disable a fax routing method on a specific fax port, and to retrieve and set the properties of a FaxRoutingMethod object. There is one FaxRoutingMethod object for each routing method associated with the specified fax port.

A client application should not call the CoCreateInstance function to retrieve an IFaxRoutingMethod interface pointer. Instead, the application must perform the following steps to create an instance of a FaxRoutingMethod object:

  1. Call the CoCreateInstance function to retrieve a pointer to an IFaxServer interface.
  2. Call the IFaxServer::Connect method to connect to an active fax server.
  3. Call the IFaxServer::GetPorts method to create and initialize a FaxPorts object for the connected fax server.
  4. Call the IFaxPorts::get_Count method and then the IFaxPorts::get_Item method to retrieve IDispatch interface pointers for each child FaxPort object. (You can also call the IUnknown::QueryInterface method to retrieve an IFaxPort interface pointer.)
  5. Use the IDispatch interface pointer to call the IFaxPort::GetRoutingMethods interface method, to retrieve an IDispatch interface pointer to a FaxRoutingMethods object.
  6. Call the IFaxRoutingMethods::get_Count method and then the IFaxRoutingMethods::get_Item method to retrieve IDispatch interface pointers for each child FaxRoutingMethod object.
  7. Use the IDispatch interface pointer to call IFaxRoutingMethod interface methods.
  8. Call the IFaxServer::Disconnect method to disconnect from the fax server.
  9. Call the IUnknown::Release method for each FaxRoutingMethod object to allow the object to deallocate itself. Also call IUnknown::Release for each FaxPort object, and to destroy the IFaxPorts interface pointer.

The property methods of the IFaxRoutingMethod interface retrieve or set the properties described following. If the property supports read access, the IFaxRoutingMethod interface includes a get_PropertyName method. If the property supports write access, the interface includes a put_PropertyName method.

Following are the properties associated with a FaxRoutingMethod object. You can find a complete list of IFaxRoutingMethod interface methods in Vtable order following the list of properties.

Property Type Access Description
DeviceId LONG R Permanent line identifier of the fax port associated with the specified fax routing method.
DeviceName BSTR R User-friendly display name of the fax port associated with the specified fax routing method.
Enable BOOL R/W Value that indicates whether the fax routing method is enabled for the specified fax port.
ExtensionName BSTR R User-friendly display name for the fax routing extension DLL that implements the specified fax routing method.
FriendlyName BSTR R User-friendly display name for the specified routing method.
FunctionName BSTR R Name of the routing extension-defined function that executes a specific fax routing method.
Guid BSTR R GUID that uniquely identifies the specified routing method.
ImageName BSTR R Executable image name of the fax routing extension DLL that implements the fax routing method.
RoutingData BSTR R Persistent routing data for a fax routing method.

Methods in Vtable Order

IUnknown Methods

IDispatch Methods

IFaxRoutingMethod Methods

Method Description
get_DeviceId Retrieves the permanent line identifier of the fax port associated with the specified fax routing method.
get_Enable
put_Enable
Retrieves a value that indicates whether the fax routing method is enabled for the specified fax port. Setting this property enables or disables the fax routing method on the specified port.
get_DeviceName Retrieves the user-friendly display name of the fax port associated with the specified fax routing method.
get_Guid Retrieves the GUID that uniquely identifies the specified routing method.
get_FunctionName Retrieves the name of the routing extension-defined function that executes a specific fax routing method.
get_ImageName Retrieves the executable image name of the fax routing extension DLL that implements the fax routing method.
get_FriendlyName Retrieves the user-friendly display name for the specified routing method.
get_ExtensionName Retrieves the user-friendly display name for the fax routing extension DLL that implements the specified fax routing method.
get_RoutingData Retrieves the persistent routing data for a fax routing method.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in faxcom.h.
  Import Library: Included as a resource in faxcom.dll.

See Also

Fax Service Client Application Programming Interface Overview, Fax Service Client API Interfaces