Catching events from external COM server  
Author Message
yllar2005





PostPosted: Top

Visual C#.Net >> Catching events from external COM server Hello,

I have a C++ COM server running that fires events (connection points) that
are then caught and processed in C#. So far, I have managed to get some
things to work, but others fail and I do not understand why.

I can pass as parameters: a single unsigned long, a single double, a single
BSTR from one application (unmanaged C++) to my C# app to get processed. I
can also send a VARIANT containing a SAFEARRAY of unsigned longs across and
extract the data. However, when I build a SAFEARRAY of doubles (VT_R8 or
VT_R4) or BSTRs the event does not get caught.

Has anyone else seen this, or have any ideas where I am going wrong? The
only discernable difference in the VARIANTS is the VT field... Unfortunately,
calling the cerver directly from C#, get the loopback to work just fine.

Any help, or ideas would be appreciated.

Andrew S. Giles

DotNet427