public static void SetOpenStatus(bool open, IntPtr handle) { if (ImeModeConversion.InputLanguageTable != ImeModeConversion.UnsupportedTable) { IntPtr ptr = UnsafeNativeMethods.ImmGetContext(new HandleRef(null, handle)); if ((ptr != IntPtr.Zero) && UnsafeNativeMethods.ImmSetOpenStatus(new HandleRef(null, ptr), open)) { bool flag = UnsafeNativeMethods.ImmReleaseContext(new HandleRef(null, handle), new HandleRef(null, ptr)); } } }