예제 #1
0
        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);
        }
예제 #2
0
 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));
 }
예제 #3
0
        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);
        }
예제 #4
0
 public static extern int hndh_get_cursor(ref HNStruct.HNPenData p);