private List <SyncInfo> FetchMachineData2(String IPAddress, bool GetAll) { int MachineNo = 1; bool IsConnected = axCZKEM1.Connect_Net(IPAddress, 4370); if (!IsConnected) { return(null); } List <SyncInfo> l = new List <SyncInfo>(); SyncInfo s = new SyncInfo(); axCZKEM1.ReadAllUserID(MachineNo); //read all the user information to the memory axCZKEM1.ReadAllTemplate(MachineNo); //read all the users' fingerprint templates to the memory while (axCZKEM1.SSR_GetAllUserInfo(MachineNo, out s.EnrollNumber, out s.Name, out s.Password, out s.Privilege, out s.IsEnabled)) //get all the users' information from the memory { if (GetAll) { axCZKEM1.GetUserTmpExStr(MachineNo, s.EnrollNumber, 0, out s.Flag, out s.TmpData, out s.TmpLength);//get the corresponding templates string and length from the memory } l.Add(s); } s.MachineNo = MachineNo; s.FingerIndex = 0; // Default finger index return(l); }