I have created a Windows Service which will interact with a punching machine.The service will connect with the machine and will fetch the data (eg. registered users,attendance logs..etc) from the machine.These methods will work fine.There is an event which will fire when an user punch the machine.So i need to register and create an event an event handler in the service. But in my service it won't fire. I created a sample Windows Form application and write all the same procedure. The event will fire in the form application. My question is
Is there any difference in registering and creating event handler for Windows Service compared to Windows form Application?
Please help me.
AxLxInterface.SocketInitialize();
AxLxInterface.WorkIndex = 0;
AxLxInterface.CardEvent += AxLxInterface_CardEvent; //event registration(but won't fire
AxLxInterface.SocketConnect(serverIp, serverPort); //will connect successfully
AxLxInterface.DateTimeRead(); //will give the machine date time
AxLxInterface.PollingStart(000, 000);
Event handler
public void AxLxInterface_CardEvent(object sender, _DLxInterfaceEvents_CardEventEvent e)
{
}