B
Bertil Emmertz
Hi !
I´m running i COM Addin to Visio written in C#. I want to set up an
EventSink to catch the event ShapeAdded. I have tried to use AddAdvise but
ran into problems.
Here is the definition for AddAdvise
Event AddAdvise(short EventCode, object SinkIUnkOrIDisp, string IIDSink,
string TargetArgs);
To set up the EventCode you use VisEventCodes according to the SDK
documentation.
(short)VisEventCodes.visEvtShape + (short)VisEventCodes.visEvtAdd
The problem is that this sum is > 32767 which is the upper limit for short
(in fact the VisEventCodes.visEvtAdd in itselft is 32768). So it won´t
compile !!
So, how do I use AddAdvise to achieve my goal.
BEz
I´m running i COM Addin to Visio written in C#. I want to set up an
EventSink to catch the event ShapeAdded. I have tried to use AddAdvise but
ran into problems.
Here is the definition for AddAdvise
Event AddAdvise(short EventCode, object SinkIUnkOrIDisp, string IIDSink,
string TargetArgs);
To set up the EventCode you use VisEventCodes according to the SDK
documentation.
(short)VisEventCodes.visEvtShape + (short)VisEventCodes.visEvtAdd
The problem is that this sum is > 32767 which is the upper limit for short
(in fact the VisEventCodes.visEvtAdd in itselft is 32768). So it won´t
compile !!
So, how do I use AddAdvise to achieve my goal.
BEz