namespace embeded_test
{
public class embeded_test
{
[DllImport("libszxb.so")]
public static extern int RFIDAuthenCard(int nBlock,string keyType,[In,Out] string[] key);
}
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void Button_Clicked(object sender, EventArgs e)
{
string[] array1 = new string[6];
Console.WriteLine("Integer array passed ByVal before call:");
for (int i1 = 0; i1 < array1.Length; i1++)
{
array1[i1] = "0xff";
}
StringBuilder nBlock =new StringBuilder("0");
string keytype = "0x0a";
int l = embeded_test.RFIDAuthenCard(0,keytype,array1);
}
}
}
it returns 255 which is a failure value and application will crash.
other API like int printerdata(char *data); is working properly.