Querying Fax Port Data (Win32 Environment)

The FaxEnumPorts function permits a fax client application to display all the fax devices currently attached to the fax server. To query an individual fax device, call the FaxGetPort function. Both functions return detailed information for the devices in FAX_PORT_INFO structures, one device per structure. The data includes the permanent line identifier, and the current status and capability of the port. Note that an application must call the FaxOpenPort function and specify the PORT_OPEN_QUERY port access level before calling the FaxGetPort function.

To display the current status of one fax device associated with a fax server, call the FaxGetDeviceStatus function. The function returns the data in a FAX_DEVICE_STATUS structure. The structure includes the current device status flag, device and station identifiers, sender and recipient names, and fax routing information.

Note that an application must first call the FaxConnectFaxServer function to obtain a fax server handle before calling the FaxEnumPorts function. An application must call the FaxOpenPort function, specifying the PORT_OPEN_QUERY port access level, to obtain a fax port handle before calling the FaxGetDeviceStatus function and the FaxGetPort function.

Because functions that begin with FaxGet and FaxEnum allocate the memory required for data buffers, the application must call the FaxFreeBuffer function to deallocate these resources.

To modify a fax device's configuration settings, an application can call the FaxSetPort function.