Click here to Skip to main content
15,886,100 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, Can anybody guide me how to pass conditional parameters to the function "GetDeviceData" which is available in the dll "plcommpro.dll" provided in the SDK.
I have tried all, only equals works and no other operator works. Even if i pass "New Record" in options that also does not work. Please help me out what to do how can i put a condition and how can i use operators like, <=, >= and logical operator e.g, and or etc?????

You can check the documentation here:
https://www.scribd.com/doc/258779884/ZKAccess3-5-Security-System-user-manual-V3-0-pdf[^]
Posted
Updated 2-Dec-16 3:25am
Comments
ZurdoDev 26-Mar-15 14:04pm    
Sounds like you should contact the vendor.

1 solution

give this a try
C#
int ret = 0;
string str = string.Empty;
int BUFFERSIZE = 10 * 1024 * 1024;
byte[] buffer = new byte[BUFFERSIZE];
string deviTablename = string.Empty;
if (string.IsNullOrEmpty(filter))
{
    deviTablename = devtable;
}
else
{
     deviTablename = "user";;
}
str = string.Empty;
string devdatfilter = string.Empty;
if (!string.IsNullOrEmpty(filter))
{
    devdatfilter = string.Format("{0}={1}", "Pin", filter);
}
string options = "";
if (handle != IntPtr.Zero)
{
      ret = GetDeviceData(handle, ref buffer[0], BUFFERSIZE, deviTablename, str, devdatfilter, options);
      if (ret > 0)
      {
            var outstring = Encoding.Default.GetString(buffer).Replace("\0", string.Empty);
            string result = Regex.Replace(outstring, @"\r\n?|\n", "");
     
     return result;
     }         
}
return ret.ToString();
 
Share this answer
 
Comments
Richard MacCutchan 2-Dec-16 9:46am    
You're 18 months too late.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900