WithEvents in ActiveX dll
Posted on 2007-03-25
slight problem... I'm making an activex dll and am trying to do something like this:
Diim WithEvents MySomeClass as New SomeClass
Public Function ExportedFunction()
'' do something that triggers SomeEvent
Private Sub MySomeClass_SomeEvent()
' THIS IS NOT TRIGGERED
Basically, when i call a function from the dll from my app, the SomeEvent event should be triggered so i can do the processing. The problem is that the event doesn't get triggered.
Note: I can't catch the events in my client app b/c it's in C++ and i can't use MFC or ATL and don't wanna do the event sinking in native C++.... Therefore, i want to make a "middleware" dll that handles the event sinking and stores a queue of messages to process that the client can poll.