DisconnectPort

#include ”faxcpp.h”

int far DisconnectPort (PORTFAX Port)

Class 1.

Class 2.

Class 2.0

Brooktrout

 

GammaLink

 

Dialogic

 

NMS

 

g

g

g

g

g

g

Description

Deletes the fax port and closes the COM port. Non-zero returning value indicates an error.

Parameters

PORTFAX

Port

Fax port object.

Return Value

Returns zero on success, otherwise returns an error code.

Sample Code

CImgApp *pApp = (CImgApp *)AfxGetApp();

 

// Reconnects the outgoing port.

if(pApp->FaxPorts[0])

            DisconnectPort (pApp->FaxPorts[0]);   // Disconnect port.

if(!(pApp->FaxPorts[0] = ConnectPort(szPortName, szFaxName))) {

            // Unable to connect port

}