Hi, I have a COM control / server I'm trying to get events from in my c#
applications.
1) I'm trying to get events in both c# console apps and in c# winform apps.
2) I can call methods on the COM control / server ok, I just don't receive
any events. The method calls are definitely successful.
3) I have got events and communicated ok with other COM controls from c# -
it's just this one I have a problem with.
4) I can communicate perfectly with the COM control / server from VB and
VC6 - both methods and events work fine.
5) I've tried STA and MTA and have used the control directly and via
tlbimp.exe
It looks like there is a problem with this particular control - is that
possible? I've tried sinking the events via delagates:
objControl.OnDisable += new IControlEvents_OnDisableEventHandler(OnDisable);
objControl.OnEnable += new IControlEvents_OnEnableEventHandler(OnEnable);
and by setting up an event sink:
// Create the object.
ControlProxy objControlProxy = new ControlProxyClass();
// Fix the connection points to fire events.
m_objIConnectionPointContainer =
(UCOMIConnectionPointContainer)objControlProxy;
Guid objGuid = typeof(eventtlbnsp.IControlEvents).GUID;
m_objIConnectionPointContainer.FindConnectionPoint (ref objGuid, out
m_objIConnectionPoint);
m_objIConnectionPoint.Advise(this, out m_nCookie);
Any help is SINCERELY appreciated, I'm really on the critical path on this.
I've looked all over the ng's - people have been asking about this for years
but I can't find any answers which work on this.
Cheers, Dave.