private void Form1_Load(object sender, EventArgs e) { try { p5DLL = new P5Dll(); p5DLL.SetMouseState(false); p5ConnectTimer.Start(); try { if (!p5DLL.Connected) p5DLL.Connect(); if (p5DLL.Connected) { txtP5Connect.Text = "P5 Connected"; p5info = p5DLL.GetInfo(); } else { txtP5Connect.Text = "P5 Not Connected"; } } catch (EntryPointNotFoundException ex) { txtP5Message.Text = ex.Message; } catch (TypeLoadException ex) { txtP5Message.Text = ex.Message; } } catch (Exception ex) { txtP5Message.Text = ex.Message; } }
public static extern void P5_GetInfo(int P5Id, ref P5Info info);