Previous PageTable Of Contents../index.htmlIndexNext Page

dx_close( )

Description | Cautions | Example | Errors

Name:

int dx_close(dev)

Inputs:

int dev

  valid Dialogic channel or board device handle

Returns:

0 if successful

 

-1 if error

Includes:

srllib.h
dxxxlib.h

Category:

Device Management

Top Of PageDescription

The dx_close( ) function closes Dialogic devices opened previously by using dx_open( ). It releases the handle and breaks any link the calling process has with the device through this handle. It will release the handle whether the device is busy or idle.

NOTE:
dx_close( ) disables the generation of all events. It does not affect the hookstate or any of the parameters that have been set for the device.

The function parameter is defined as follows:

Parameter

Description

dev

specifies the valid Dialogic device handle obtained when a board or channel was opened using dx_open( ).

Top Of PageCautions

Once a device is closed, a process can no longer perform any action on that device using that device handle. Other handles for that device that exist in the same process or other processes will still be valid. The only process affected by dx_close( ) is the process that called the function.

NOTES:
1. The dx_close( ) function doesn't affect any action occurring on a device, it only breaks the link between the calling process and the device by freeing the specified device handle. Other links through different device handles are still valid.
2. Never use the Windows close( ) function to close a Voice device; unpredictable results will occur.
3. dx_close( ) will discard any outstanding events on that handle.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate failure, a system error has occurred; use dx_fileerrno( ) to obtain the system error value. Refer to the dx_fileerrno( ) function for a list of the possible system error values.


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002