C#获取运行程序的进程ID [DllImport("User32.dll", CharSet = CharSet.Auto)] public static extern int GetWindowThreadProcessId(IntPtr hwnd, out int ID); [DllImport("user32.dll", EntryPoint = "FindWindow")] private extern static IntPtr Fin
本程序主要功能是:获取某程序的ParentProcessID 直接上代码: // parent.cpp (Windows NT/2000) // // This example will show the method how you can retrieve the parent // process ID on Windows NT/2000 using the NT Native API // // // (c)1999 Ashot Oganesyan K, SmartLine, Inc