找回密码
 加入
搜索
查看: 1750|回复: 2

如何获得一个device的Location information?

[复制链接]
发表于 2010-5-31 15:27:03 | 显示全部楼层 |阅读模式
本帖最后由 kemyliu 于 2010-5-31 20:26 编辑

求助!如何获得一个device的Location information?自己研究过pusofalse 的<SetUPAPI.au3>库,可是还是不知如何获得,达人请看下图,同时请高人指教!!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2010-5-31 15:39:10 | 显示全部楼层
#include <SetupAPI.au3>

Local $sDeviceId, $hDevInst, $sLocation

; Device Identifier string.
$sDeviceId = _CM_Get_Device_Id_By_Name_Ex("USB Composite Device", 1)

; Handle to device instance.
$hDevInst = _CM_Locate_DevNode($sDeviceId)

$sLocation = _CM_Get_DevNode_Registry_Property($hDevInst, $CM_DRP_LOCATION_INFORMATION)
Msgbox(0, "", $sLocation)
 楼主| 发表于 2010-5-31 16:46:02 | 显示全部楼层
对于pusofalse 大大的感谢真是如滔滔江水!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-18 16:40 , Processed in 0.090840 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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