Beispiel #1
0
        public static bool IsOpen(IntPtr handle)
        {
            IntPtr ptr  = UnsafeNativeMethods.ImmGetContext(new HandleRef(null, handle));
            bool   flag = false;

            if (ptr != IntPtr.Zero)
            {
                flag = UnsafeNativeMethods.ImmGetOpenStatus(new HandleRef(null, ptr));
                UnsafeNativeMethods.ImmReleaseContext(new HandleRef(null, handle), new HandleRef(null, ptr));
            }
            return(flag);
        }