I created a Windows service that will interact with a punch. The service will connect to the machine and will retrieve data (for example, registered users, attendance logs ... etc) from the machine. These methods will work fine. There is an event that will fire when the user hits the machine. Therefore, I need to register and create an event with an event handler in the service. But in my ministry he does not work. I created a sample Windows Form application and wrote all the same procedures. The event will be fired in the form application. My question is:
Is there a difference in registering and creating an event handler for the Windows Service compared to the Windows Form Application?
Please help me.
AxLxInterface.SocketInitialize();
AxLxInterface.WorkIndex = 0;
AxLxInterface.CardEvent += AxLxInterface_CardEvent;
AxLxInterface.SocketConnect(serverIp, serverPort);
AxLxInterface.DateTimeRead();
AxLxInterface.PollingStart(000, 000);
Event handler
public void AxLxInterface_CardEvent(object sender, _DLxInterfaceEvents_CardEventEvent e)
{
}