AV library AvStatus() AvStrfmt()
Programming guideline of WinDom

AvWaitfor()

NAME

AvWaitfor - Wait for a message.

PROTOTYPAGE

int AvWaitfor( int msg, INT16 *buf, long idle);

PARAMETERS

msg:
message to wait for,

buf:
8-word buffer,

idle:
time idle,

return:
1 if the message is received, 0 else.

DESCRIPTION

AvWaitfor() waits for a specific message (MU_MESAG event). Typically, it is the answer of an AV request sent to the AV server. If other messages occur, these messages are not lost but are resent to the application.

DRAWBACK

AvWaitfor() does not make use of EvntWindom(), just evnt_multi().

EXAMPLE

     	/* send an AV request and wait the answer */
     
     	int exec_prog( char *prg, char *cmd) {
     		ApplWrite( app.avid, AV_STARTPROG, prg, cmd, 0);
     		return AvWaitfor( VA_PROGSTARTED, evnt.buf, 1000);
     	}