[C#] 纯文本查看 复制代码 [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount); [DllImport("user32.dll")] // 窗口是否可见 private static extern bool IsWindowVisible(IntPtr hWnd); [DllImport("user32.dll")] // 窗口句柄是否有效 private static extern bool IsWindow(IntPtr hWnd); void Main() // { IntPtr hWnd; StringBuilder className = new StringBuilder(64); string qqclassName; for (int i = 1000000; i <= 9000000; i++) { hWnd = (IntPtr)i; if (IsWindow(hWnd) && !IsWindowVisible(hWnd)) { if (GetClassName(hWnd, className, className.Capacity) != 0) { qqclassName = className.ToString(); if (qqclassName.StartsWith("NTQQOpenSdk")) { Console.WriteLine($"窗口句柄ID:{hWnd.ToInt64()} === \t{qqclassName}"); var match = Regex.Match(qqclassName, @"_(\d+)$"); if (match.Success) { string result1 = match.Groups[1].Value; Console.WriteLine(result1); } // return; } } } } } |
11111111111111111111111111 |
学习下不错 |
学习一下感谢分享 |
获取一次后,不管在不在线,都能取到,求大佬更新 |
新技能已get√ |
学习学习 |
感谢分享,很给力!~ |
失效了吧????????????? |
感谢分享 |
sitemap|
易语言源码|
易语言教程|
易语言论坛|
易语言模块|
手机版|
广告投放|
精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:[email protected]
网站简介:精易论坛成立于2009年,是一个程序设计学习交流技术论坛,隶属于揭阳市揭东区精易科技有限公司所有。
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司
( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173