FaxGetDeviceStatusW function (winfax.h)
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.
WINFAXAPI BOOL FaxGetDeviceStatusW( [in] HANDLE FaxPortHandle, [out] PFAX_DEVICE_STATUSW *DeviceStatus );
Specifies a fax port handle returned by a call to the FaxOpenPort function.
Pointer to the address of a buffer to receive a FAX_DEVICE_STATUS structure. The structure describes the status of one fax device. For information about memory allocation, see the following Remarks section
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.
||One or both of the DeviceStatus or FaxPortHandle parameters are NULL.|
||Access is denied. FAX_PORT_QUERY access is required.|
||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.
The winfax.h header defines FaxGetDeviceStatus as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|