Open door through programming star reader connected to ZK C3 pannel

  • Thread starter Thread starter AfzalKhanBH
  • Start date Start date
A

AfzalKhanBH

Guest
HI i am facing issue, i created the window based application, the door connected with star reader which is connected to ZK C3 Pannel, i used the zkemkeeper.dll to connect the machine, and reader getting connected and i used Interop.zkemkeeper.dll to open the lock but when the reader get connected the lock did not open and pop with the error "please connect the device."

Please help and suggest the correct code. the lock is door bolt lock.

Thank you.

What I have tried:

private void btnACUnlock_Click(object sender, EventArgs e)
{
if (bIsConnected == false)
{
MessageBox.Show("Please connect the device first!", "Error");
return;
}

if (txtDelay.Text.Trim() == "")
{
MessageBox.Show("Please input the Delay seconds first!", "Error");
return;
}
int idwErrorCode = 0;
int iDelay = Convert.ToInt32(txtDelay.Text.Trim());//time to delay

Cursor = Cursors.WaitCursor;
if (objCZKEM.ACUnlock(iMachineNumber, iDelay))
{
MessageBox.Show("ACUnlock, Dalay Seconds:" + iDelay.ToString(), "Success");
}
else
{
objCZKEM.GetLastError(ref idwErrorCode);
MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
}
Cursor = Cursors.Default;
}

I tried with this code to open the lock but this does not work.
Then i went method and use this

public bool ACUnlock(int dwMachineNumber, int Delay)
{
return objCZKEM.ACUnlock(dwMachineNumber, Delay);

//(dwMachineNumber, Delay);
// throw new NotImplementedException();
}

But still did not work

Please help
Afzalkhan

Continue reading...
 
Back
Top