How to catch events from COM?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to catch events from COM?

Federico Balaguer-2
Hello!

I am writing an application that interacts with Visio.  It means that my
application has to catch events from Visio (let say a new shape added to
a page).  The problem I have is that I don't know how to create a "sink"
object that catches those events. I was looking at AXEventSink but the
problem is that Visio objects are not Automation like and I got lost
with the source of it (AXInterfaceTypeAnalyzer (?)).

I was looking at the documentation and it says that the sink should
implement a "visEventProc" which has 6 parameters... I am lost! :-(

Is there a way to do it with what I got in my image? Or I should create
my own sink?

Thanks.
__________________________
Federico Balaguer
[hidden email]
http://www.uiuc.edu/ph/www/balaguer


Reply | Threaded
Open this post in threaded view
|

Re: How to catch events from COM?

Bill Schwab-2
Fredrico,

> I am writing an application that interacts with Visio.  It means that my
> application has to catch events from Visio (let say a new shape added to
> a page).  The problem I have is that I don't know how to create a "sink"
> object that catches those events. I was looking at AXEventSink but the
> problem is that Visio objects are not Automation like and I got lost
> with the source of it (AXInterfaceTypeAnalyzer (?)).

If you look in Ian's newsgroup archives, you should find a post in which
Blair showed me how to use
AXEventSink to capture events from the MS Agent control.  It was _easy.


> I was looking at the documentation and it says that the sink should
> implement a "visEventProc" which has 6 parameters... I am lost! :-(
>
> Is there a way to do it with what I got in my image? Or I should create
> my own sink?

The vis prefix on the name has me concerned that they might have created
their own event mechanism instead of reusing the COM connectable objects
mechansm.  Custom event systems are sadly all too common, so it wouldn't
surprise me.

Sorry not to be of any real help :)

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]