A
Abhi
Hi,
I need to fire COM events from C# and the client to handle those events is
in C++.
Following is the code snippet of the COM events and the dispinterface in C#.
[Guid("12854E47-AD44-4283-B503-1176CC827A49")]
public interface Foo1ComInterface
{
void FireRequest( string str );
}
[Guid("073D1766-7969-41fd-B794-8B65B0EADAF3")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface Foo1ComEvents
{
void FooEvent( string str );
}
[ Guid("22EFEC33-5B40-4417-AFF0-DE0C5B7C9E47")]
[ ClassInterface(ClassInterfaceType.None) ]
[ ComSourceInterfaces(typeof(Foo1ComEvents))]
public class BooHoo : Foo1ComInterface
{
......
}
So far I have generated a tlb file using regasm and did a #import in the C++
code and am able to
call the FireRequest function as defined above from C++. But how should I
handle the event
fired from the .NET side. Please help!!!
Thanks,
Abhi
I need to fire COM events from C# and the client to handle those events is
in C++.
Following is the code snippet of the COM events and the dispinterface in C#.
[Guid("12854E47-AD44-4283-B503-1176CC827A49")]
public interface Foo1ComInterface
{
void FireRequest( string str );
}
[Guid("073D1766-7969-41fd-B794-8B65B0EADAF3")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface Foo1ComEvents
{
void FooEvent( string str );
}
[ Guid("22EFEC33-5B40-4417-AFF0-DE0C5B7C9E47")]
[ ClassInterface(ClassInterfaceType.None) ]
[ ComSourceInterfaces(typeof(Foo1ComEvents))]
public class BooHoo : Foo1ComInterface
{
......
}
So far I have generated a tlb file using regasm and did a #import in the C++
code and am able to
call the FireRequest function as defined above from C++. But how should I
handle the event
fired from the .NET side. Please help!!!
Thanks,
Abhi