IFaxPorts interface (faxcom.h)

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.

  • Retrieve the number of fax ports associated with a fax server.
  • Create and retrieve IFaxPort interface pointers for FaxPort objects.

Inheritance

The IFaxPorts interface inherits from the IDispatch interface. IFaxPorts also has these types of members:

Methods

The IFaxPorts interface has these methods.

 
IFaxPorts::get_Count

The IFaxPorts::get_Count method retrieves the number of fax ports attached to the connected fax server.
IFaxPorts::get_Item

The IFaxPorts::get_Item method creates a FaxPort object for a specified fax port. The object allows enumeration of port configuration information for a specific connection to a fax server.

Remarks

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.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header faxcom.h

See also

Fax Service Client API Interfaces

Fax Service Client API for Windows 2000

IDispatch