PFAXCLOSE callback function (winfax.h)

The FaxClose function closes the following types of fax handles:

Syntax

PFAXCLOSE Pfaxclose;

BOOL Pfaxclose(
  [in] HANDLE FaxHandle
)
{...}

Parameters

[in] FaxHandle

Type: HANDLE

Specifies the fax handle to close. This value can be a fax server handle returned by a call to the FaxConnectFaxServer function, or a fax port handle returned by a call to the FaxOpenPort function.

Return value

Type: BOOL

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError. GetLastError can return one of the following errors.

Return code Description
ERROR_ACCESS_DENIED
Access is denied. FAX_PORT_QUERY access is required.
ERROR_INVALID_HANDLE
The FaxHandle parameter is invalid.

Remarks

A fax client application must call the FaxClose function as the last function before it terminates. The CloseHandle function cannot close the handle to a fax server or a fax port.

When the FaxClose function closes a handle allocated by the FaxConnectFaxServer function, the function disconnects the calling application from the specified fax server.

A fax client application continues to receive fax events from the fax service after the application successfully calls the FaxClose function to close a fax server handle. This permits the fax service to shut down and conserve system resources when the service has been idle for an extended period. If you keep the handle to the fax server open, the fax service does not shut down.

For more information, see Enabling an Application to Receive Notifications of Fax Events, Connecting to a Fax Server and Disconnecting from a Fax Server, and FaxInitializeEventQueue.

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 winfax.h

See also

Fax Service Client API Functions

Fax Service Client API for Windows 2000

FaxConnectFaxServer

FaxOpenPort