IFaxServer::ListenToServerEvents method (faxcomex.h)
The IFaxServer::ListenToServerEvents method registers the FaxServer object to receive notifications about one or more types of server events, or to stop these notifications.
Syntax
HRESULT ListenToServerEvents(
[in] FAX_SERVER_EVENTS_TYPE_ENUM EventTypes
);
Parameters
[in] EventTypes
Type: FAX_SERVER_EVENTS_TYPE_ENUM
A value that contains a set of bit flags representing the types of events for which the FaxServer object is registering to receive notifications. For more information, see FAX_SERVER_EVENTS_TYPE_ENUM.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
In Microsoft Visual Basic, if you want the fax server to receive notifications, you have to create the FaxServer object using the following syntax:
Dim WithEvents objFaxServer As New FAXCOMEXLib.FaxServer
Set objFaxServer = CreateObject("FaxServer")
In Microsoft Visual C++, the IFaxServerNotify interface on the FaxServer object receives notifications of the events.
By default, the FaxServer object does not receive notifications for any server events. If you want the FaxServer object to receive notifications, you must call IFaxServer::ListenToServerEvents and pass to it the event types for which you want to receive notifications. To stop receiving the notification, call this method with EventTypes equal to fsetNONE.
Access rights for this method depend on which events are requested, as shown in the following table.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | faxcomex.h |
DLL | Fxscomex.dll |