
Description | Termination Events | Cautions | Example | Errors | See Also
Name: |
int cl_Close(hDevice) | |
Inputs: |
long hDevice |
|
Returns: |
0 on success | |
Includes: |
cllib.h | |
Mode: |
synchronous | |
The cl_Close( ) function closes a previously opened call logging device that was opened using the cl_Open( ) function.
Parameter |
Description |
hDevice: |
The device handle of the call logging device to be closed. |
None
The Call Logging API is not multi-thread safe. Call logging functions must be called within the same thread.
#include <srllib.h>
#include <gclib.h>
#include <gcerr.h>
#include <cllib.h>
#include <stdio.h>
#include <malloc.h>
/* The Call Logging Device Handle */
extern long g_hDevice;
typedef struct
{
const char* pszProtocol;
const char* pszNetworkDeviceName;
const char* pszUserDeviceName;
} DEVICEUSRATTR;
extern long EventHandler(unsigned long hEvent);
extern DEVICEUSRATTR* GetDeviceUsrAttr(long hDevice);
void ExitApplication(void)
{
DEVICEUSRATTR* pDeviceUsrAttr;
if (g_hDevice != EV_ANYDEV)
{
if (sr_dishdlr(g_hDevice, EV_ANYEVT, EventHandler) != 0)
{
printf("ExitApplication - sr_dishdlr() failed\n");
}
pDeviceUsrAttr = GetDeviceUsrAttr(g_hDevice);
free(pDeviceUsrAttr);
if (cl_Close(g_hDevice) != 0)
{
printf("ExitApplication - cl_Close() failed\n");
}
g_hDevice = EV_ANYDEV;
if (gc_Stop() != GC_SUCCESS)
{
printf("ExitApplication - gc_Stop() failed\n");
}
}
}
None
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation