PREV TOC HOME INDEX NEXT


gc_ResultInfo( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_ResultInfo(*a_Metaevent, a_Info)
Inputs:

METAEVENT *a_Metaevent

  • pointer to the structure of metaevent data
 

GC_INFO* a_Info

  • pointer to the GC_INFO data structure
Returns:

0 if error value successfully retrieved

<0 if fails to retrieve error value

Includes:

gclib.h

gcerr.h

Category:

system controls and tools

Mode:

synchronous

Platform and Technology:

All

Description

The gc_ResultInfo( ) function retrieves information about Global Call events. Calling the gc_ResultInfo( ) function is equivalent to calling the gc_ResultValue( ), gc_ResultMsg( ), and gc_CCLibNameToID( ) functions in turn. To retrieve the information, the gc_ResultInfo( ) function must be called immediately after a Global Call event arrives and before the next event is requested.

If the application gets an event, the gcValue or ccValue field of the GC_INFO structure identifies the cause of the event to which the a_Metaevent parameter points. This pointer is acquired by the gc_GetMetaEvent( ) or gc_GetMetaEventEx( ) function.

Parameter

Description

a_Metaevent points to the metaevent associated with this event
a_Info points to the GC_INFO structure where information about the event is contained. See GC_INFO for more information.

Termination Events

None

Cautions

Errors

If the gc_ResultInfo( ) function fails, error analysis should not be done by calling either the gc_ErrorInfo( ) or gc_ErrorValue( ) function. A failure return generally indicates that a_Info is NULL.

Example

/*
-- This function can be called anytime after a GlobalCall event has occurred
-- This procedure prints the result information to the console with no other side effects
*/
void PrintResultInfo(METAEVENT *a_metaeventp)
{
    int         retCode;
    GC_INFO     t_Info;
    GC_INFO     gc_error_info;   /* GlobalCall error information data */ 
    retCode = gc_ResultInfo(a_metaeventp, &t_Info);
    if (retCode == GC_SUCCESS) {
        printf("gc_ResultInfo() successfully called\n");
        PrintGC_INFO(&t_Info);
    } else {
        printf("gc_ResultInfo() call failed\n");
    }
} 
/*
-- This function is called to print GC_INFO to the system console
-- Typically it would be called after a call to gc_ErrorInfo()
-- or gc_ResultInfo() to print the resulting GC_INFO data structure
*/
void PrintGC_INFO(GC_INFO *a_Info)
{
    printf("a_Info->gcValue = 0x%x\n", a_Info->gcValue);
    printf("a_Info->gcMsg = %s\n", a_Info->gcMsg);
    printf("a_Info->ccLibId = %d\n", a_Info->ccLibId);
    printf("a_Info->ccLibName = %s\n", a_Info->ccLibName);
    printf("a_Info->ccValue = 0x%x\n", a_Info->ccValue);
    printf("a_Info->ccMsg = %s\n", a_Info->ccMsg);
    printf("a_Info->additionalInfo = %s\n", a_Info->additionalInfo);
    printf("Enter <CR> to continue: ");
    getchar();
} 

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