文件名称:USBListening
- 所属分类:
- 驱动编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2014-07-22
- 文件大小:
- 1.83mb
- 下载次数:
- 0次
- 提 供 者:
- l***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
当USB设备插入或者弹出时,Windows会产生一条全局消息:WM_DEVICECHANGE
我们需要做的是,获得这条消息的wParam参数,如果为DBT_DEVICEARRIVAL则表示有设备插入并可用,
如果是DBT_DEVICEREMOVECOMPLETE则表示有设备已经移除。再查看lParam参数为DBT_DEVTYP_VOLUME时,
就可以取出DEV_BROADCAST_VOLUME结构的卷号dbcv_unitmask,就知道是哪个卷被插入或者弹出。-When a USB device is inserted or pop-up, Windows will generate a global message: WM_DEVICECHANGE
We need to do is get this message wParam parameter, if it means that there is DBT_DEVICEARRIVAL device inserted and available,
If there is DBT_DEVICEREMOVECOMPLETE said equipment has been removed. Then view the lParam parameter is DBT_DEVTYP_VOLUME,
You can remove the volume number dbcv_unitmask DEV_BROADCAST_VOLUME structure, you know what the volume is inserted or ejected.
我们需要做的是,获得这条消息的wParam参数,如果为DBT_DEVICEARRIVAL则表示有设备插入并可用,
如果是DBT_DEVICEREMOVECOMPLETE则表示有设备已经移除。再查看lParam参数为DBT_DEVTYP_VOLUME时,
就可以取出DEV_BROADCAST_VOLUME结构的卷号dbcv_unitmask,就知道是哪个卷被插入或者弹出。-When a USB device is inserted or pop-up, Windows will generate a global message: WM_DEVICECHANGE
We need to do is get this message wParam parameter, if it means that there is DBT_DEVICEARRIVAL device inserted and available,
If there is DBT_DEVICEREMOVECOMPLETE said equipment has been removed. Then view the lParam parameter is DBT_DEVTYP_VOLUME,
You can remove the volume number dbcv_unitmask DEV_BROADCAST_VOLUME structure, you know what the volume is inserted or ejected.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
res\USBListening.ico
...\USBListening.rc2
ReadMe.txt
Resource.h
StdAfx.cpp
StdAfx.h
USBListening.aps
USBListening.clw
USBListening.cpp
USBListening.dsp
USBListening.dsw
USBListening.h
USBListening.ncb
USBListening.opt
USBListening.plg
USBListening.rc
USBListeningDlg.cpp
USBListeningDlg.h
Debug\StdAfx.obj
.....\USBListening.exe
.....\USBListening.ilk
.....\USBListening.obj
.....\USBListening.pch
.....\USBListening.pdb
.....\USBListening.rar
.....\USBListening.res
.....\USBListeningDlg.obj
.....\vc60.idb
.....\vc60.pdb
res
Debug