当前位置:编程学习 > C#/ASP.NET >>

C# GetWindowThreadProcessId用法

变量a的值是句柄,怎样得到PID?(让pid被赋为b的值) --------------------编程问答--------------------

        //获取与指定窗口关联在一起的一个进程和线程标识符
        [DllImport("user32", EntryPoint = "GetWindowThreadProcessId")]
        private static extern int GetWindowThreadProcessId(int hwnd,
                                                           out int lpdwProcessId);
int b;                     //进程标识
GetWindowThreadProcessId(a, out b);

补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,