Issue event

Top  Previous  Next

On every issue on the protocol window Moskito can call an event routine. Besides, whole lines are not collected, but it will hand over every issue pushed by the user. actionProcedure the issue may manipulate, even the real issue can suppress. Extending the text is problematic at the moment, because the length of the buffer cannot be adapted.

#define EVENT_ART_PRINTF 1

int DLLENTRY IOregisterEvent (int art, void *proc, void *userdata, int doRegister);

art (int) [IN]

In this case must have the value EVENT_ART_PRINTF (1).

proc (void *) [IN]

This procedure is called by entry of the event. The type void* is only one deputy. The procedure has to go as

int DLLENTRY event_printf (char *text, int *len, void *data);

be declared.

userdata (void *) [IN]

This value will hand over uninterpreted to the ActionProcedure.

doRegister (int) [IN]

Will hand over here FALSE (0), the before registered routine is removed. The affected routine is identified on the basis of Procedureadresse and parametre userdata.

Becomes here TRUE (! =0) hand over, the routine with in the list of the events is taken up.

 

Parametre of the ActionProcedure

text (char *) [IN]

Pointer on the text. The contents of the buffer can be changed arbitrarily. The length cannot be increased.

len (int *) [IN / OUT]

The length of the text can be reduced, also on 0. The text is ordinarily concluded with a zero sign, so that must not be respected to the value len while reading the text.

data (void *) [IN]

The value was handed over while registering as userdata.

Result

(int) [OUT]

1 carry out No issue in the command window.

2 No issues and no other action routines explain.

0 next action routines explain, as the last carry out the issue in the protocol window.

Declaration

#include "ausgabe.h"

 

int DLLENTRY IOregisterEvent (

PIOPIPES pipes,

int art,

void * proc,

void * userdata,

int doRegister

};