Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<UserInfo> GetUsers()
- {
- string tablename = "user";
- int numberOfUsers = 0;
- string str = "*";// "CardNo\tPin\tPassword\tGroup\tStartTime\tEndTime";
- int BUFFERSIZE = 1 * 1024 * 1024;
- byte[] buffer = new byte[BUFFERSIZE];
- string options = "";
- bool opt = false;
- List<UserInfo> AllUsers = new List<UserInfo>();
- if (IntPtr.Zero != h)
- {
- //External Крашиться здесь
- numberOfUsers = GetDeviceData(h, ref buffer[0], BUFFERSIZE, devtablename, str, devdatfilter, options);
- }
- else
- {
- return AllUsers;
- }
- if (numberOfUsers >= 0)
- {
- AllUsers = GetUsersFromBuffer(buffer, numberOfUsers);
- return AllUsers;
- }
- else
- {
- PluginContext.Log.Error("Get data failed.The error is " + numberOfUsers);
- return AllUsers;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement