I am developing a winform fingerprint reader application using ZKFinger SDK.
When i am running following code:
ZKFPEngXClass obj = new ZKFPEngXClass();
obj.OnImageReceived += Obj_OnImageReceived;
obj.OnCapture += Obj_OnCapture;
obj.OnEnroll += Obj_OnEnroll;
obj.OnFeatureInfo += Obj_OnFeatureInfo;
then i get error on
obj.OnCapture += Obj_OnCapture;
obj.OnEnroll += Obj_OnEnroll;
obj.OnFeatureInfo += Obj_OnFeatureInfo;
but
obj.OnImageReceived += Obj_OnImageReceived;
works fine.
Error is
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Interop.ZKFPEngXControl.dll".
Additional information: Exception from HRESULT: 0x80040202
You should register those events only after you connect to the device.
if (objCZKEM.Connect_Net(IPAdd, Port))
{
//65535 or 32767- depends
if (objCZKEM.RegEvent(1, 32767))
{
// [ Register your events here ]
// [ Go through the _IZKEMEvents_Event class for a Ex);
}
return true;
}
Instead of using
ZKFPEngXClass obj = new ZKFPEngXClass();
use
ZKFPEngXControl.ZKFPEngX obj = new ZKFPEngXControl.ZKFPEngX();
Hope it helps.
User contributions licensed under CC BY-SA 3.0