Platform SDK: Fax Services

IFaxPorts

The IFaxPorts dual interface is used by a fax client application to access the FaxPort objects derived from a FaxServer object. The interface enumerates port configuration information for a connection to an active fax server. A FaxPorts object is a collection of FaxPort objects.

The IFaxPorts interface includes methods that allow a fax client application to perform the following tasks:

When to Implement

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

When to Use

Use the IFaxPorts interface to create and retrieve IFaxPort interface pointers to FaxPort objects. There is one FaxPort object for each port associated with the connected fax server.

To create an instance of a FaxPort object, perform the following steps. Note that a fax client application should not call the CoCreateInstance function to retrieve an IFaxPort interface pointer.

  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 IFaxPort interface methods.
  6. Call the IFaxServer::Disconnect method to disconnect from the fax server.
  7. Call the IUnknown::Release method for each FaxPort object to allow the object to deallocate itself, and again to destroy the IFaxPorts interface pointer.

The property methods of the IFaxPorts interface retrieve the properties described following. Because these properties support read access, the IFaxPorts interface includes a get_PropertyName method for each property.

Property Type Access Description
Count LONG R Number of fax ports associated with the connected fax server.
Item VARIANT R IDispatch interface pointer to a FaxPort object.

Methods in Vtable Order

IUnknown Methods

IDispatch Methods

IFaxPorts Methods

Method Description
get_Count Retrieves the number of fax ports associated with the connected fax server.
get_Item Creates a FaxPort object for a specified fax port.

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