private static void onRead() { int num1 = (int)HuionDriverDLL.timeBeginPeriod(1U); while (reading) { HNStruct.HNPenData p = new HNStruct.HNPenData(); try { HuionDriverDLL.hndh_get_cursor(ref p); } catch (Exception ex) { HuionLog.saveLog("Get Touch Info", ex.Message); HuionLog.saveLog("Get Touch Info", ex.StackTrace); } if (p.btn > (byte)0) { if (touchInfoListener != null) { touchInfoListener(p); } IntPtr num2 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(HNStruct.HNPenData))); Marshal.StructureToPtr((object)p, num2, false); HuionDriverDLL.PostMessage(mHandle, 1064, num2, IntPtr.Zero); Marshal.FreeHGlobal(num2); } Thread.Sleep(1); } int num3 = (int)HuionDriverDLL.timeEndPeriod(1U); }
public static int hndh_get_cursor(ref HNStruct.HNPenData p) { if (isX64) { return(HuionDriverDLL_X64.hndh_get_cursor(ref p)); } return(HuionDriverDLL_X86.hndh_get_cursor(ref p)); }
public static HNStruct.HNPenData getTouchInfo() { HNStruct.HNPenData p = new HNStruct.HNPenData(); try { HuionDriverDLL.hndh_get_cursor(ref p); } catch (Exception ex) { HuionLog.saveLog("Get Touch Info", ex.Message); HuionLog.saveLog("Get Touch Info", ex.StackTrace); } return(p); }
public static extern int hndh_get_cursor(ref HNStruct.HNPenData p);