Please check the code below :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using iTimeService.dsitimeTableAdapters;
using System.IO;
namespace iTimeService
{
public partial class Service1 : ServiceBase
{
public Service1()
{
InitializeComponent();
}
public zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
private bool bIsConnected = false;//the boolean value identifies whether the device is connected
private int iMachineNumber = 1;//the serial number of the device.After connecting the device ,this value will be changed.
TENTERTableAdapter tenteradapter = new TENTERTableAdapter();
T012_GATETableAdapter gateadapter = new T012_GATETableAdapter();
}
}
I am getting an error on the object creation of zkemkeeper.CZKEMClass
where it says : interop type 'zkemkeeper.CZKEMClass' cannot be embedded. Use the application interface instead.
click on the reference you have, I think for that specific project that would be 'zkemkeeper'
then on its properties just set the 'Embed Interop Type' to 'False' I hope this would help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With