It_SendEvent 

Use

Sends the contents of the event structure (and all the related structures) to the R/3 application server.

Use It_SendEvent after altering the event structure programmatically, or after the user had changed the screen, resulting

Before sending an event, make sure you set up the appropriate bits in the eventtype member of IT_EVENT.

Syntax

DWORD DLEX It_SendEvent(HANDLE hMr, PPIT_EVENT ppEvt);

Parameters

hMr

Connection handle

ppEvt

Pointer to a pointer to the IT_EVENT structure. The value of PIT_EVENT should be one that was retrieved from It_GetEvent*. If successful, on return PIT_EVENT will be zeroed out and the buffer freed.

Return Value

Returns TRUE on success, FALSE on error.

Example

The following example simulates sending the Execute key (F8 on the keyboard, which has VK_F8 or 119 key value)

// pEvt is a valid pointer to PIT_EVENT structure.

if (ItEv_SetPFKey(pEvt, VK_F8) == FALSE)

{

printf("SetPFKey Error!--ItEv_SetPFKey\n");

// Handle error case

}

if (It_SendEvent(hHandle, &pEvt) == FALSE)

{

printf("Send Event Error while setpfkey!--It_SendEvent\n");

// Handle error case

}

if (It_GetEvent(hHandle, &pEvt) == FALSE)

{

printf("Get Event Error! Program aborted!\n");

// Handle error case

}

 

See Also

It_SendEventEx