'delete user from zk attendance device using c# api

I have set of ZK attendance device that using static IP address. I'm enrolling users to this machines using zkmkeeper.dll in C#. now i want to delete old users from these machines using system. I can't find the function to delete users, but there is function to disable. I want to delete that users permanently from devices.



Solution 1:[1]

I had a similar issue when deleting userInfo or enrolled data but i found a workaround

objCZKEM.DeleteEnrollData(machineId, userId, machineId, 12)

according to the documentation : 12 indicates deleting the user (including the fingerprints, card number and password).

Solution 2:[2]

@Yuuuucef, thank you for reference. According to documentation

5.2.4.3 DeleteEnrollData
    VARIANT_BOOL DeleteEnrollData(LONG dwMachineNumber, LONG dwEnrollNumber,
LONG dwEMachineNumber, LONG dwBackupNumber)

The values of dwMachineNumber and dwEMachineNumber must be the same

Solution 3:[3]

After trying many ways I have finally found a way. clear all user data using axCZKEM1.ClearData(Convert.ToInt32(number), flag) and re enroll the data using Database.

Solution 4:[4]

The way I found works for me. Use the SSR_deleteEnrollData function with only 3 parameters (while notice asks for 4 parameters)

SSR_deleteEnrolData(dwMachineNumber , dwEnrollNumber , dwBackupNumber)

Maybe depends of device version.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yuuuucef
Solution 2 zafern
Solution 3 Saranga
Solution 4 Ahmed Bamba