The event handler is stored in a HandlerDesc data structure as a PFNHANDLER, along with a pointer to a block of memory allocate and owned by the decorator implementation. This pointer will be passed into the decorator's event handler with each event to be processed. The HandlerDesc data structure also contains a PFNFREEHANDLER that will be called when the decorator is released so that the decorator may free the private memory allocated and passed to the event handler.
IDecorator_SetHandler() associates a given HandlerDesc data structure with a particular decorator.
void IDecorator_SetHandler(IDecorator *p, HandlerDesc *pd);