RobH
Aug 2nd, 2001, 08:45 AM
Hi. I want my ActiveX server to notify the client (another ActiveX EXE) of events using a callback interface.
I defined a simple dll with a single method called NotifyMe(). I compiled the dll as INotify.dll
Both my projects reference this dll.
In my client I use Implements INotify.NotifyMe
Private Function INotify_NotifyMe() As Variant
MsgBox "it works"
End Function
My server has a registration Method:
Private mNotify as INotify.NotifyMe
Public Function RegisterNotification(ByRef iNotify as NotifyMe)
Set mNotify = iNotify
End Function
So far so good. Everything compiles, no errors. The problem is when the server calls the event nothing happens.
I have a timer that calls mNotify.NotifyMe
What I expect to happen is the implementation on the client to run and the Msgox to appear. But nothing happens. What am I missing? How do I invoke the callback back on the client?
Thanks,
Rob
I defined a simple dll with a single method called NotifyMe(). I compiled the dll as INotify.dll
Both my projects reference this dll.
In my client I use Implements INotify.NotifyMe
Private Function INotify_NotifyMe() As Variant
MsgBox "it works"
End Function
My server has a registration Method:
Private mNotify as INotify.NotifyMe
Public Function RegisterNotification(ByRef iNotify as NotifyMe)
Set mNotify = iNotify
End Function
So far so good. Everything compiles, no errors. The problem is when the server calls the event nothing happens.
I have a timer that calls mNotify.NotifyMe
What I expect to happen is the implementation on the client to run and the Msgox to appear. But nothing happens. What am I missing? How do I invoke the callback back on the client?
Thanks,
Rob