[DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern bool IsWow64Process(IntPtr hProcess, out bool Wow64Process); [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern bool Wow64DisableWow64FsRedirection(out IntPtr OldValue); private void btnKlavyeAc_Click(object sender, EventArgs e) { try { bool bWow64 = false; IsWow64Process(Process.GetCurrentProcess().Handle, out bWow64); if (bWow64) { IntPtr OldValue = IntPtr.Zero; bool bRet = Wow64DisableWow64FsRedirection(out OldValue); } Process.Start(new ProcessStartInfo { UseShellExecute = true, FileName = "osk" }); } catch (Exception ex) { MessageBox.Show(ex.Message); } } |