Enabling an Application to Receive Notifications of Fax Events

This functionality is currently available only in the Microsoft Win32 environment. It is not available in the Component Object Model (COM) implementation environment.

Call the FaxInitializeEventQueue function to create a fax event queue for a fax client application. The queue enables the application to receive notifications of asynchronous events from the fax server.

An application can specify how the fax server should inform the client application of events. The application can request that the fax server queue I/O completion packets to an I/O completion port, or it can specify that the fax service post notification messages. For more information, see the following topics.

A fax client application can call the FaxInitializeEventQueue function only once per fax service session. (A fax service session begins when the service sends the FEI_FAXSVC_STARTED message, and ends when it sends the FEI_FAXSVC_ENDED message.) This prevents the fax service from posting duplicate messages to the client computer. In Windows 2000, if you call FaxInitializeEventQueue more than once during the same session, the function fails and it returns an ERROR_INVALID_DATA error code. In Windows XP and Windows Server 2003, if you call FaxInitializeEventQueue more than once during the same session the function will succeed, and you will receive duplicate event notifications.

A fax client application continues to receive fax events from the fax service after the application closes the handle to a fax server. For more information, see FaxClose and FaxInitializeEventQueue.

For a list of the asynchronous events that can occur within the fax server, see FAX_EVENT.