Hi All,
I am trying to create a C# Com object and call it from unmanaged Cpp. I
have created a call library. I was able to create the interfaces for the
functions and call them from cpp code
//in c#
[Guid("58644AAF-F082-485f-AB33-CC344A5D3522")]
public interface TestDLL_Interface
{
[DispId(1)]
string Testing(string userid);
}
//in cpp
#import "TestDLL.tlb"
using namespace TestDLL;
TestDLL_Interface *t_com_ptr;
//calling the function
CoInitialize(NULL);
TestDLL::TestDLL_InterfacePtr p(_uuidof(TestDLL::Class1));
t_com_ptr = p;
std::string abc = t_com_ptr->Testing("Abhi");
Till this point it is working perfectly and i was able to call the function
without and issue.
Now i need to create an event, and write the event handling code in the cpp
section so that when the event is generated it will fire the code. How do i
do this? Is there any other method of doing this?
Any example would be hugely helpful. Thanks a lot in advance.
Regards
Abhishek