public Pen(uint touchPoints, FeedbackMode mode) { if (!IsSupported) { throw new ExternalException("Not Supported on your OS."); } _contact = new POINTER_PEN_INFO(); _contact.pointerInfo.pointerType = TouchApi.PT_PEN; _contact.pointerInfo.pointerId = 0; _contact.pressure = 32000; _contact.penFlags = TouchApi.PEN_FLAG_NONE; _contact.penMask = TouchApi.PEN_MASK_PRESSURE; if (!TouchApi.InitializeTouchInjection(touchPoints, (uint)mode)) { throw new ExternalException("Initialisation failed. Code: " + Marshal.GetLastWin32Error()); } }
public static extern bool GetPointerPenInfo(int pointerId, out POINTER_PEN_INFO pointerType);
internal static extern bool GetPointerPenInfo(int pointerID, ref POINTER_PEN_INFO penInfo);
internal static extern bool GetPointerPenInfo(int pointerID, ref POINTER_PEN_INFO penInfo);
internal static extern bool GetPointerPenInfo([In] UInt32 pointerId, [In, Out] ref POINTER_PEN_INFO penInfo);
public static extern bool GetPointerPenInfo(UInt32 id, out POINTER_PEN_INFO info);