Search code examples
c#zkteco

ZKteco SDK open/close a specific door (Access-Control device)


The application ZKAccess-3.5 has the ability to enumerate doors, and open or close the selected door.

The sdk has this incomplete API:

 VARIANT_BOOL ACUnlock(LONG dwMachineNumber, LONG Delay);

 VARIANT_BOOL GetDoorState(LONG MachineNumber, [in,out] LONG* State, [out,retval] VARIANT_BOOL* pVal);

How do I select the door I want to open/close? I have 2 doors. I expected a doorID parameter or something like that.

Device: inBio 260 / 2 doors


Solution

  • EDIT: PullSDK Wrapper in C#, Shows how to use PullSDK

    Those functions are not a part of the PullSDK.

    ZKTeco claims the standalone SDK includes PullSDK when It does not cover everything (example: ControlDevice function).

    The native dll plcommpro.dll is the main dll for the PullSDK. It exports the function ControlDevice, that can be used to lock/unlock doors, but the documentation is confusing, I'm not sure how to use it, I will try to decompile ZKAccess3.5 to find that out.

    int ControlDevice(HANDLE handle, LONG OperationID, LONG Param1, LONG Param2, LONG Param3, LONG Param4, const char *Options)
    

    ZKTeco is not good at what it does (hardware, software, protocols, sdk, docs).