This is causing headache, the event OnGetStatusEvent is never fired...
I know it has to do with the fact it's encapsulated inside class.
The Event is a method of a com object, I did not implement it myself...
The following code always work if inside a windows or console application.
Please help me to understand how I could declare the event differently so it gets fired when GetStatus is finished.
public class TestClass : EventArgs, IDVR
{
public newSOMELIB.RemoteEnt myNtObj;
string IDVR.getStatus(string strIP)
{
myNtObj.GetStatus(answerBack);
myNtObj.OnGetStatusEvent+=newSOMELIB._NTRemoteEvents_OnGetStatusEventEventHandler(myNTObj_OnGetStatusEvent);
return "something";
}
void myNtObj_OnGetStatusEvent(int lSessionID, string eReason, string pIUnitStatus)
{
// This Never Get Fired !!!!!!!
throw new NotImplementedException();
}
Thanks, I'll be refreshing....