Platform SDK: Fax Services

IFaxServer::Connect

The IFaxServer::Connect method connects a fax client application to the specified fax server. Before accessing most interfaces that begin with IFax, the application must call this method to initiate a connection with an active fax server. A fax server connection is not required to access an IFaxTiff interface.

Visual Basic Reference

HRESULT Connect(
  BSTR ServerName  // target fax server name
);

Parameters

ServerName
[in] Specifies a null-terminated string that contains the name of the target fax server. If this parameter is NULL, the method connects the application to the fax server on the local computer.

Return Values

Returns an HRESULT value indicating success or failure. If the method succeeds, it returns S_OK. Otherwise, it returns a COM-defined error code.

You should not check directly for success or failure. Use the COM SUCCEEDED and FAILED macros instead.

Remarks

The fax client application must call the IFaxServer::Disconnect method to disconnect from the fax server.

For more information, see Connecting to a Fax Server and Disconnecting from a Fax Server.

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, IFaxServer, IFaxServer::Disconnect