wm通过注册表获得UA
2011-03-02 16:40
369 查看
WM:
1.通过注册表
1.通过注册表
CString CTyydApp::GetUserAgent() { HKEY hKey = NULL; DWORD dwValue; LONG rc = NULL; CString strUserAgent = _T(""); rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"//Security//Internet Explorer//User Agent", 0, 0, &hKey); if (rc == ERROR_SUCCESS) { RegQueryValueEx(hKey, L"CustomBase", NULL, NULL, NULL, &dwValue); BYTE* pBuf = new BYTE[dwValue]; RegQueryValueEx(hKey, L"CustomBase", NULL, NULL, pBuf, &dwValue); strUserAgent.Format(L"%s", pBuf); delete[] pBuf; RegCloseKey(hKey); } return strUserAgent; }
相关文章推荐
- 通过读注册表的方法获得 home directory:所有用户
- 通过发送WM_GETTEXT命令获得EDIT中的信息
- 获得WIN7管理员权限(可通过修改注册表,或者组策略改变)
- 获得WIN7管理员权限(可通过修改注册表,或者组策略改变)
- 通过读取注册表获得 MediaPlayer the highest version.
- vba通过读取注册表获得浏览器版本
- 通过注册表获得系统语言
- 通过注册表获得操作系统语言设置
- Windows下通过写注册表的方式实现程序开机自启动
- python 在linux下通过top,和dh命令获得cpu,内存,以及硬盘信息
- 下面的例子演示如何通过 jQuery text() 和 html() 方法来获得内容:
- Win7 一键获得管理所有权限(最高权限)注册表
- 通过UIView获得UIViewController
- 通过注册表或 GetDataSources 方法枚举SQL Server实例
- 通过rowid值获得块号,文件号的函数
- 通过时间,获得星期的开始时间,结束时间
- WinForm通过操作注册表实现限制软件使用次数的方法
- Android通过源码编译apk获得系统权限
- linux下通过go语言获得系统进程cpu使用情况的方法
- 通过注册表修改默认浏览器