internal PenContext(IPimcContext3 pimcContext, IntPtr hwnd, PenContexts contexts, bool supportInRange, bool isIntegrated, int id, IntPtr commHandle, int tabletDeviceId, UInt32 wispContextKey) { _contexts = contexts; _pimcContext = new SecurityCriticalDataClass <IPimcContext3>(pimcContext); _id = id; _tabletDeviceId = tabletDeviceId; _commHandle = new SecurityCriticalData <IntPtr>(commHandle); _hwnd = new SecurityCriticalData <IntPtr>(hwnd); _supportInRange = supportInRange; _isIntegrated = isIntegrated; WispContextKey = wispContextKey; UpdateScreenMeasurementsPending = false; }
/// <summary> /// Queries the GIT key for the WISP Tablet Context /// </summary> /// <param name="context">The context to query through</param> /// <returns>The GIT key for the WISP Tablet Context</returns> internal static UInt32 QueryWispContextKey(IPimcContext3 context) { int key = 0; Guid unused = Guid.Empty; int unused2 = 0; int unused3 = 0; float unused4 = 0; context.GetPacketPropertyInfo(GetWispContextKey, out unused, out key, out unused2, out unused3, out unused4); if (key == 0) { throw new InvalidOperationException(); } return((UInt32)key); }