PREV TOC HOME INDEX NEXT


gc_Start( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_Start(startp)
Inputs:

GC_START_STRUCT *startp

  • pointer to call control library information
Returns:

0 if successful

<0 if failure

Includes:

gclib.h

gcerr.h

Category:

system controls and tools

Mode:

synchronous

Platform and Technology:

All

See the Global Call Technology User's Guides for additional information.

Description

The gc_Start( ) function starts and initializes call control libraries. This function must be called before any other Global Call function is called. The application can specify one or more call control libraries to be started through the GC_START_STRUCT data structure.

To start all the supported call control libraries:

The function opens the call control libraries that interface directly to the network interface so that these libraries can be used by the Global Call library.

The gc_Start( ) function returns 0 if the call control libraries have successfully started. If a NULL parameter is passed to gc_Start( ) and a call control library is not present, an error is not returned. However, the state of the missing call control library will be "failed". If GC_START_STRUCT is used, an error is returned if one or more of the libraries fail to load.

Successfully started libraries are available to be used by the Global Call functions and are called "available" libraries. Libraries that fail to start are called "failed" libraries. Use the gc_CCLibStatusEx( ) function to determine the status (available, configured, failed) of one or all call control libraries.

Parameter

Description

startp points to list of call control libraries to be loaded and started. If NULL, then all of the supported libraries will be started.

Termination Events

None

Cautions

Errors

If this function returns <0 to indicate failure, use the gc_ErrorInfo( ) function to retrieve the reason for the error. See the "Error Handling" section in the Global Call API Programming Guide. All Global Call error codes are defined in the gcerr.h file.

Example

#include <stdio.h>
#include <srllib.h>
#include <gclib.h>
#include <gcerr.h> 
int sysinit()
{
    GC_START_STRUCT gclib_start;     /* Structure for gc_Start() */
    GC_INFO         gc_error_info;   /* GlobalCall error information data */ 
       GC_CUSTOMLIB_STRUCT custom_lib1 = {
        "libgcxyz.dll",
        "xyz_Start"
    }; 
       CCLIB_START_STRUCT  cclib_start[]={ 
        {"GC_ANAPI_LIB",NULL}, 
        {"GC_ICAPI_LIB",NULL},
        {"GC_PDKRT_LIB",NULL},
        {"GC_CUSTOM1_LIB",(void *)&custom_lib1},
    }; 
    gclib_start.num_cclibs = 4;
    gclib_start.cclib_list = cclib_start; 
    /* Next issue a gc_Start() Call */
    if ( gc_Start( &gclib_start ) != GC_SUCCESS )    {
        /* process error return as shown */
        gc_ErrorInfo( &gc_error_info );
        printf ("Error: gc_Start(), GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, 
                CC ErrorValue: 0x%lx - %s\n",
                gc_error_info.gcValue, gc_error_info.gcMsg, 
                gc_error_info.ccLibId, gc_error_info.ccLibName,
                gc_error_info.ccValue, gc_error_info.ccMsg);
        return (gc_error_info.gcValue);
    }
    return (0); 
    /* Next open the GlobalCall Line Devices */ 
return(0);
} 

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated February, 2003