I am trying to write an ActiveX control in VB that wraps a 'c' based dll. The basic requirement is for a callback 'event' from the dll to generate an 'event' from the ActiveX control.

The problem I have is that to use callbacks and the 'AddressOf' operator the callback code must be in a standard module within the ActiveX component. However, the RaiseEvent command can only be used in a class or usercontrol module and I can find no way for a standard module to communicate with a usercontrol module within an ActiveX component (other than polling).

I am sure there must be an easy way around this but it has so far escaped me. Any suggestions appreciated.