Previous PageTable Of ContentsHomeIndexNext Page

sr_dishdlr( )

Description | Cautions | Example | Errors | See Also

Name:

long sr_dishdlr(dev, evt_type, handler)

Inputs:

long dev

  Dialogic device handle

 

long evt_type

  event type

 

long (*handler)(unsigned long parm)

  event handling function

Returns:

0 if success

 

-1 if failure

Includes:

srllib.h

Type:

Event Handling function

Top Of PageDescription

The sr_dishdlr( ) function disables the handler function, handler( ), that was previously enabled using sr_enbhdlr( ) on a device/event type/handler triplet. The sr_dishdlr( ) function can be called from within a handler even if the same handler is being disabled.

The function parameters are described as follows:

Parameter

Description

dev

Specifies the valid device handle obtained when the device was opened using an xx_open( ) function, where xx is the prefix identifying the device to be opened. Specify EV_ANYDEV to be notified of an event on any device.

evt_type

Specifies the event for which the application is waiting, for example:

 

  • Specify the specific event. Refer to the technology-specific Programmer's Guide for a list of possible event types.
  • Specify EV_ANYEVT in evt_type and the device in the dev parameter to be notified of any event on a specific device.
  • Specify EV_ANYEVT in evt_type and EV_ANYDEV in the dev parameter to be notified of any event on any device.

handler

Points to an application-defined event handler that processes the event. See sr_enbhdlr( ) for more information on the application-defined event handlers.

Top Of PageCautions

Only one handler is disabled by this function; the handler must be disabled under the same conditions as it was enabled. To disable device non-specific and/or event non-specific handlers specify EV_ANYDEV for the device, and/or EV_ANYEVT for the event type.

Handlers cannot be used with the SRL Extended Asynchronous Programming model.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate failure, obtain the reason for the error by calling the SRL standard attribute function ATDV_LASTERR(SRL_DEVICE) or ATDV_ERRMSGP(SRL_DEVICE) to retrieve either the error code or a pointer to the error description, respectively. One of the following errors may be returned:

ESR_SYS

  • Error from operating system; use dx_fileerrno( ) to obtain error value.

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated January, 2001