[DllImport("RGUSBdrv.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern UInt16 GetLogCount();
private void button2_Click(object sender, EventArgs e)
{
if (Connected)
richTextBox1.AppendText(Convert.ToString(GetLogCount()) + "\n");
}