void Initialize()
{
dword aep; // Application Endpoint handle
dword csi; // consumed Service Instance handle
dword ceg; // consumed Eventgroup handle
dword cev; // consumed Event handle
// open Application Endpoint
aep = AREthOpenLocalApplicationEndpoint(17, 50002);
// create Service Instance
csi = AREthCreateConsumedServiceInstance(aep,10,1);
// create Eventgroup
ceg = AREthAddConsumedEventGroup(csi,1);
// create Event Consumer
cev = AREthCreateEventConsumer(csi,1,"CallbackEvent1");
}
void CallbackEvent1(dword cevHandle, dword messageHandle)
{
// this function is called if the Event was sent. Parameters can
// be evaluated here.
}