Windows Service doesnt receive callback events


i have win32 dll , imported .net c# application. dll calls callback functions defined in app. works well, had rewrite app windows service. dont receive events dll. observed in service, callback functions run in separated thread , in app, main process , callbacks run in same thread.

does has idea this?

hi carl,

you can call callback functions use of delegates. here sample coding uses delegates callbackfunctions.




code snippet

public delegate void callbacklistener;


class sample

{

public void callbackfunction()
{


if(this.invokerequired)
{
callbacklistener listener = new callbacklistener();
this.invoke(listener);
}

else

{
// normal code function
}

}

}





.NET Framework  >  Common Language Runtime Internals and Architecture



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

RFC_ERROR_SYSTEM_FAILURE with SAP ECC 6 Unicode

C# System.Data.Common DbCommand and getting Datasets from Oracle