08.01.2013 Views

Dialogic® Global Call API Library Reference

Dialogic® Global Call API Library Reference

Dialogic® Global Call API Library Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Errors<br />

copy the specified GC_PARM_BLK — gc_util_copy_parm_blk( )<br />

If this function returns GC_ERROR(-1) to indicate failure, use the gc_ErrorInfo( ) function to<br />

retrieve the reason for the error. See the “Error Handling” section in the Dialogic ® <strong>Global</strong> <strong>Call</strong> <strong>API</strong><br />

Programming Guide. All <strong>Global</strong> <strong>Call</strong> error codes are defined in the gcerr.h file.<br />

Example<br />

#include "gclib.h"<br />

#include "gcip.h"<br />

void process_event(void)<br />

{<br />

METAEVENT metaevent;<br />

GC_PARM_BLKP my_blkp = NULL;<br />

}<br />

if(gc_GetMetaEvent(&metaevent) != GC_SUCCESS)<br />

{<br />

/* process error */<br />

}<br />

Switch(metaevent.evttype)<br />

{<br />

case GCEV_OFFERED:<br />

/* make a copy of the parm blk */<br />

if(metaevent.extevtdatap)<br />

{<br />

if ( gc_util_copy_parm_blk( &my_blkp,(GC_PARM_BLKP)(metaevent.extevtdatap))<br />

!= GC_SUCCESS )<br />

{<br />

/* Process error */<br />

}<br />

}<br />

...<br />

}<br />

...<br />

See Also<br />

Dialogic ® <strong>Global</strong> <strong>Call</strong> <strong>API</strong> <strong>Library</strong> <strong>Reference</strong> — January 2008 371<br />

Dialogic Corporation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!