找回密码
 加入
搜索
查看: 7357|回复: 6

[系统综合] _WinAPI_GetCurrentHwProfile();谁知道这个函数怎么使用

  [复制链接]
发表于 2012-3-8 00:27:01 | 显示全部楼层 |阅读模式
悬赏20金钱未解决
本帖最后由 tttbbb999 于 2012-3-8 02:18 编辑

检索本地计算机当前硬件配置文件的信息.
#Include <WinAPIEx.au3>
_WinAPI_GetCurrentHwProfile ( )

参数
None.  



返回值
成功: 返回 $tagHW_PROFILE_INFO 结构,包含有关当前硬件配置文件的信息.
失败: 返回 0,设置@error:标志为非 0 值.  

注意/说明
None

=====================================
找了好久,都没相关资料~~~~



已解决

发表于 2012-3-8 00:38:49 | 显示全部楼层
#Include <WinAPIEx.au3>
Local $tag = _WinAPI_GetCurrentHwProfile()
Msgbox(0, '硬件配置文件', 'DockInfo: ' & DllStructGetData($tag, 'DockInfo') & @LF & _
                'ProfileGuid: ' & DllStructGetData($tag, 'ProfileGuid') & @LF & _
                'ProfileName: ' & DllStructGetData($tag, 'ProfileName'))
发表于 2012-3-8 00:49:20 | 显示全部楼层
本帖最后由 haijie1223 于 2012-3-8 01:27 编辑

#Include <WinAPIEx.au3>
#Include <array.au3>
Local $Data = _WinAPI_GetCurrentHwProfile()
_ArrayDisplay($Data)

http://msdn.microsoft.com/en-us/library/windows/desktop/ms724311(v=vs.85).aspx

看下注册表这个位置的信息:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\IDConfigDB\Hardware Profiles\0001
 楼主| 发表于 2012-3-8 02:14:45 | 显示全部楼层
afan 发表于 2012-3-8 00:38



    谢了.
'DockInfo'
'ProfileGuid'
'ProfileName:'

只是不知道这几个是怎么获得的~~
 楼主| 发表于 2012-3-8 02:15:27 | 显示全部楼层
(v=vs.85).aspx

看下注册表这个位置的信息:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ ...
haijie1223 发表于 2012-3-8 00:49



    原来这个函数是读注册表呀~~呵呵.谢了.
发表于 2012-3-8 14:08:04 | 显示全部楼层
帮助里面可以查到
$tagHW_PROFILE_INFO = "dword DockInfo;wchar ProfileGuid[39];wchar ProfileName[80];"
发表于 2013-7-23 16:50:49 | 显示全部楼层
win8 下测试有问题,
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-3 05:11 , Processed in 0.083062 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表