Platform SDK: Fax Services |
The FaxConnectFaxServer function connects a fax client application to the specified fax server. The function returns a fax server handle that is required to call other fax client functions that facilitate job, device, configuration, and document management.
A fax client application must call the FaxConnectFaxServer function successfully before it calls any other fax client function.
BOOL WINAPI FaxConnectFaxServer( LPCTSTR MachineName OPTIONAL, // fax server name LPHANDLE FaxHandle // handle to the fax server );
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.
Error code | Description |
---|---|
ERROR_INVALID_PARAMETER | The FaxHandle parameter is NULL. |
ERROR_NOT_ENOUGH_MEMORY | An error occurred during memory allocation. |
The fax client application must call the FaxClose function to disconnect from the fax server and deallocate the handle that the FaxConnectFaxServer function returns. For more information, see Connecting to a Fax Server and Disconnecting from a Fax Server.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable with BackOffice Small Business Server.
Header: Declared in Winfax.h.
Library: Included as a resource in Winfax.dll.
Unicode: Implemented as Unicode and ANSI versions on all platforms.
Fax Service Client Application Programming Interface Overview, Fax Service Client API Functions, FaxClose