Platform SDK: Fax Services |
The FAX_EVENT structure represents the contents of an I/O completion packet. The fax server sends the completion packet to notify a fax client application of an asynchronous fax server event.
To create a fax event queue, the fax client application must call the FaxInitializeEventQueue function. The queue enables the application to receive notifications of asynchronous events from the fax server.
typedef struct _FAX_EVENT { DWORD SizeOfStruct; // structure size, in bytes FILETIME TimeStamp; // time of event DWORD DeviceId; // line identifier of the device DWORD EventId; // event identifier DWORD JobId; // identifier of fax job } FAX_EVENT, *PFAX_EVENT;
Event | Meaning |
---|---|
FEI_DIALING | The sending device is dialing a fax number. |
FEI_SENDING | The sending device is transmitting a page of fax data. |
FEI_RECEIVING | The receiving device is receiving a page of fax data. |
FEI_COMPLETED | The device has completed a fax transmission call. |
FEI_BUSY | The sending device has encountered a busy signal. |
FEI_NO_ANSWER | The receiving device does not answer. |
FEI_BAD_ADDRESS | The sending device cannot complete the call because the fax number is invalid. |
FEI_NO_DIAL_TONE | The sending device cannot complete the call because it does not detect a dial tone. |
FEI_DISCONNECTED | The device cannot complete the call because a fax device was disconnected, or because the fax call itself was disconnected. |
FEI_FATAL_ERROR | The device encountered a fatal protocol error. |
FEI_NOT_FAX_CALL | The modem device received a data call or a voice call. |
FEI_CALL_DELAYED | The sending device received a busy signal multiple times. The device cannot retry the call because dialing restrictions exist. (Some countries restrict the number of retry attempts when a number is busy.) |
FEI_CALL_BLACKLISTED | The device cannot complete the call because the telephone number is blocked or reserved; numbers such as 911 are blocked. |
FEI_RINGING | The receiving device is ringing. |
FEI_ABORTING | The device is aborting a fax job. |
FEI_ROUTING | The receiving device is routing a received fax document. |
FEI_MODEM_POWERED_ON | The modem device was turned on. |
FEI_MODEM_POWERED_OFF | The modem device was turned off. |
FEI_IDLE | The device is idle. |
FEI_FAXSVC_ENDED | The fax service has terminated. For more information, see the following Remarks section. |
FEI_ANSWERED | The receiving device answered a new call. |
FEI_FAXSVC_STARTED | The fax service has started. For more information, see the following Remarks section. |
FEI_JOB_QUEUED | The fax job has been queued. |
FEI_DELETED | The fax job has been processed. The job identifier for the job is no longer valid. |
FEI_NEVENTS | The total number of fax events received. For more information, see the following Remarks section. |
After a fax client application receives the FEI_FAXSVC_ENDED message from the fax service, it will no longer receive fax events. To resume receiving fax events, the application must call the FaxInitializeEventQueue function again when the fax service restarts. The application can determine if the fax service is running by using the service control manager.
If the application receives events using notification messages, it can use the FEI_NEVENTS event. If the message is between the application's base window message and the base window message + FEI_NEVENTS, then the application can process the message as a fax window message. An application specifies the base window message using the MessageStart parameter to the FaxInitializeEventQueue function; the base window message must be greater than the WM_USER message. For more information, see FaxClose and Enabling an Application to Receive Notifications of Fax Events.
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.
Unicode: Declared as Unicode and ANSI structures.
Fax Service Client Application Programming Interface Overview, Fax Service Client API Structures, FaxInitializeEventQueue, FaxClose, FILETIME