The function
[DllImport (" termb. DLL, "EntryPoint=" GetFPDate CharSet=CharSet. Ansi, SetLastError=false, CallingConvention=CallingConvention. StdCall)]
Public static extern int GetFPDate (ref byte strTmp, ref int strLen);
Byte [] ICFeatureData;
ICFeatureData=https://bbs.csdn.net/topics/new byte [1024];
GetFPDate (ref ICFeatureData [0], ref length);
In pb how to implement the code, this is my
The Function of Integer GetFPDate (Ref String strTmp, Ref Long strLen) Library 'termb. DLL' Alias For "GetFPDate; Ansi
"String ls_str
Long Length
Ls_str=Space (1024)
GetFPDateCS (ls_str, Length)
Get the value is not correct, to take on a great god
CodePudding user response:
How no one come across? Pray god to teach experienceCodePudding user response:
There is also a Byte in PB, you can try thisOr use a blob
CodePudding user response:
Byte [1024] is too big, PB no byte type (binary), it should be 1024 - bit binaryGenerally an address is FFFF 16-bit binary
Advice to find similar DLL interface function, can block read (assuming GetFPDateCStmp), such as every time read a 16-bit binary
//define a numerical (decimal)
Long ll_ICFeatureDatatmp
Ll_ICFeatureDatatmp=65535//you must initialize the
GetFPDateCStmp (ll_ICFeatureDatatmp, Length)
Then through transformation (may need to be converted to hexadecimal), loop read together again
CodePudding user response: