Platform SDK: Fax Services |
The FaxGetDeviceStatus function returns to a fax client application current status information for the fax device of interest. The returned data includes, among other items, device and station identifiers, sender and recipient names, and routing information.
BOOL WINAPI FaxGetDeviceStatus( HANDLE FaxPortHandle, // fax port handle PFAX_DEVICE_STATUS *DeviceStatus // structure to receive fax device data );
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 | One or both of the DeviceStatus or FaxPortHandle parameters are NULL. |
ERROR_ACCESS_DENIED | Access is denied. FAX_PORT_QUERY access is required. |
ERROR_NOT_ENOUGH_MEMORY | An error occurred during memory allocation. |
A fax administration application typically calls the FaxGetDeviceStatus function to display the status of a fax device associated with a fax server. The FaxGetDeviceStatus function allocates the memory required for the FAX_DEVICE_STATUS buffer pointed to by the DeviceStatus parameter. An application must call the FaxFreeBuffer function to deallocate the resources associated with this parameter.
For more information, see Fax Device Management and Freeing Fax Resources.
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, FaxOpenPort, FaxFreeBuffer, FAX_DEVICE_STATUS