2.2.66 FAX_EVENT
The FAX_EVENT structure represents the contents of an input/output (I/O) completion packet. The fax server sends the completion packet to notify a fax client application about an asynchronous fax server event.
-
typedef struct { DWORD SizeOfStruct; FILETIME TimeStamp; DWORD DeviceId; DWORD EventId; DWORD JobId; } FAX_EVENT, *PFAX_EVENT;
SizeOfStruct: A DWORD ([MS-DTYP] section 2.2.9) value that holds the total size of the structure, in bytes. This value MUST be 24 bytes.
TimeStamp: Specifies a FILETIME ([MS-DTYP] section 2.3.3) structure that contains the time at which the fax server generated the event.
DeviceId: Specifies a DWORD variable that indicates the line identifier for the fax device (port) of interest.
EventId: Specifies a DWORD variable that identifies the current asynchronous event that occurred within the fax server. The following table lists the possible events and their meanings.
-
Value/code
Meaning
FEI_DIALING
0x00000001
The sending device is dialing a fax number.
FEI_SENDING
0x00000002
The sending device is transmitting a page of fax data.
FEI_RECEIVING
0x00000003
The receiving device is receiving a page of fax data.
FEI_COMPLETED
0x00000004
The device has completed a fax transmission call.
FEI_BUSY
0x00000005
The sending device has encountered a busy signal.
FEI_NO_ANSWER
0x00000006
The receiving device does not answer.
FEI_BAD_ADDRESS
0x00000007
The sending device cannot complete the call because the fax number is invalid.
FEI_NO_DIAL_TONE
0x00000008
The sending device cannot complete the call because it does not detect a dial tone.
FEI_DISCONNECTED
0x00000009
The device cannot complete the call because a fax device was disconnected or because the fax call itself was disconnected.
FEI_FATAL_ERROR
0x0000000A
The device encountered a fatal protocol error.
FEI_NOT_FAX_CALL
0x0000000B
The modem device received a data call or a voice call.
FEI_CALL_DELAYED
0x0000000C
The sending device received a busy signal multiple times. The device cannot retry the call because dialing restrictions exist (some countries and regions restrict the number of retry attempts when a number is busy).
FEI_CALL_BLACKLISTED
0x0000000D
The device cannot complete the call because the telephone number is blocked or reserved; numbers such as 911 are blocked.
FEI_RINGING
0x0000000E
The receiving device is ringing.
FEI_ABORTING
0x0000000F
The device is aborting a fax job.
FEI_ROUTING
0x00000010
The receiving device is routing a received fax document.
FEI_MODEM_POWERED_ON
0x000000011
The modem device was turned on.
FEI_MODEM_POWERED_OFF
0x000000012
The modem device was turned off.
FEI_IDLE
0x000000013
The device is idle.
FEI_FAXSVC_ENDED
0x000000014
The fax service has terminated. For more information, see the following Remarks section.
FEI_ANSWERED
0x000000015
The receiving device answered a new call.
FEI_JOB_QUEUED
0x000000016
The fax job has been queued.
FEI_DELETED
0x00000017
The fax job has been processed. The job identifier for the job is no longer valid.
FEI_INITIALIZING
0x00000018
The modem device is being initialized.
FEI_LINE_UNAVAILABLE
0x00000019
The device cannot complete the call because the requested line is unavailable.
FEI_HANDLED
0x0000001A
The fax job has been processed.
FEI_FAXSVC_STARTED
0x0000001B
The fax service has started. For more information, see the following Remarks section. Interchangeable with FEI_NEVENTS.
FEI_NEVENTS
0x0000001B
The total number of fax events received. For more information, see the following Remarks section. Interchangeable with FEI_FAXSVC_STARTED.
JobId: Specifies a unique number that identifies the fax job of interest. If this member is equal to the value 0xffffffff, it indicates an inactive fax job. Note that this number is not a print spooler identification number.
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 whether the fax service is running by using the service control manager.
If the application receives events by means of 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 by using the MessageStart parameter in the FaxInitializeEventQueue function; the base window message MUST be greater than the WM_USER message.