Partager via


FaxServer.ListenToServerEvents method

The ListenToServerEvents method registers the FaxServer object to receive notifications about one or more types of server events, or to stop these notifications.

Syntax

FaxServer.ListenToServerEvents( _
  ByVal EventTypes As FAX_SERVER_EVENTS_TYPE_ENUM _
) As Long

Parameters

EventTypes [in]

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.

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 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.

Event Required access rights
fsetINCOMING_CALL farQUERY_IN_ARCHIVE
fsetIN_QUEUE farSUBMIT_LOW
farQUERY_JOBS
fsetOUT_QUEUE farSUBMIT_LOW
farQUERY_JOBS
fsetCONFIG farQUERY_CONFIG
fsetDEVICE_STATUS farQUERY_CONFIG
fsetACTIVITY farQUERY_CONFIG
fsetIN_ARCHIVE farSUBMIT
farQUERY_IN_ARCHIVE
fsetOUT_ARCHIVE farSUBMIT_LOW
farQUERY_OUT_ARCHIVE

 

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
FaxComex.h
DLL
Fxscomex.dll

See also

Visual Basic Example

Registering for Event Notifications

FaxServer

IFaxServer