h324FormatEvent

Formats an H.324M event into a string for print diagnostics.

Prototype

DWORD h324FormatEvent ( char *lineprefix, CTA_EVENT *event, char *buffer, unsigned size)

Argument

Description

lineprefix

Pointer to a character string that is placed at the beginning of every new line in the formatted event string.

event

Pointer to the Natural Access CTA_EVENT structure, which is an event structure to be formatted:

typedef struct
{
   DWORD   id;            /* Event code and source service ID       */
   CTAHD   ctahd;         /* Natural Access context handle          */
   DWORD   timestamp;     /* Timestamp                              */
   DWORD   userid;        /* Userid (defined by ctaCreateContext)   */
   DWORD   size;          /* Size of buffer if buffer != NULL       */
   void    *buffer;       /* Buffer pointer                         */
   DWORD   value;         /* Event status or event-specific data    */
   DWORD   objHD;         /* Service object handle                  */
} CTA_EVENT;

buffer

Pointer to the buffer to receive the event string.

size

Size of the buffer in bytes.

Return values

Return value

Description

SUCCESS

 

Events

None.

Details

h324FormatEvent creates a detailed textual description of the H.324M event.

See also

h324SubmitEvent

Example

void DemoShowEvent( CTA_EVENT *event )
{
    char format_buffer[CTA_MAX_FORMAT_SIZE];
    char *prefix = "\t\t\t";  /* default demo indent */
    format_buffer[0] = '\0';
    h324FormatEvent
( prefix, event, format_buffer, CTA_MAX_FORMAT_SIZE );
    printf( "%s", format_buffer );
}