Regarding connection point notifications.
-
Hi, I'm using one COM component(exe), which implements the connection points also. I have a client which implements Sink interface . The event the server fires is a method with a single argument BSTR. When the server fires the event, client gets the notification, but the BSTR value is invalid(empty string). The problem is also seen with ULONG parameter also(where the value is garbage). Please suggest a solution, and please suggest if it is a good idea to have parameters in the event notifications. Also if two clients are connected to the server, only the client which caused the event to be fired is getting the notification. Thanks and regards, Raja Pratap.
-
Hi, I'm using one COM component(exe), which implements the connection points also. I have a client which implements Sink interface . The event the server fires is a method with a single argument BSTR. When the server fires the event, client gets the notification, but the BSTR value is invalid(empty string). The problem is also seen with ULONG parameter also(where the value is garbage). Please suggest a solution, and please suggest if it is a good idea to have parameters in the event notifications. Also if two clients are connected to the server, only the client which caused the event to be fired is getting the notification. Thanks and regards, Raja Pratap.
It's a little while since I did any COM connection points but if your data isn't getting through then I guess it's a marshalling issue. Check you Proxy/Stub implementation. Parameters in the event notifications should definitely work. The Server end needs a loop to notify all the clients for each event. Most of the samples leave this out as they simplify to one client. 5 years ago I had to implement reverse connection points with no documentation so I remember how painful this can be.;)
Nothing is exactly what it seems but everything with seems can be unpicked.