[DllImport("kernel32.dll", SetLastError = true)]private static extern bool Wow64DisableWow64FsRedirection(ref IntPtr ptr);
[DllImport("kernel32.dll", SetLastError = true)]private static extern bool Wow64RevertWow64FsRedirection(IntPtr ptr);private void TspKeypad_Click(object sender, EventArgs e){ bool isKeyboadRunning = Process.GetProcessesByName("osk").Length > 0; if (isKeyboadRunning) return; IntPtr ptr = IntPtr.Zero; bool redirected = Wow64DisableWow64FsRedirection(ref ptr); try { Process.Start("osk.exe"); } finally { if (redirected) { Wow64RevertWow64FsRedirection(ptr); } }}
該文章在 2025/10/20 10:22:45 編輯過