资源简介
Usb设备插拔检测, 方法:利用检测USB设备的PID, VID的方法进行设备识别。
1.原型在codeproject, 原来版本是vs2005, 我改成了vs6.
2. 改成vs6后,在设备串比对的地方改了下。
整理时间: 2010/06/06 20:18
用途:做gina程序时,有的Key驱动不支持多进程访问。我们只在必要的地方使用Key驱动(读写Key),在检测key状况时,不再用读Key的方法,来判断Key设备是否在线。减小了冲突的可能。
当然,如果Key驱动做的好,就不用这种检测方法。比如HaiTai的Key.
![](http://www.nz998.com/pic/45894.jpg)
代码片段和文件信息
// CheckSystemPlug.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “CheckSystemPlug.h“
#include “CheckSystemPlugDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCheckSystemPlugApp
BEGIN_MESSAGE_MAP(CCheckSystemPlugApp CWinApp)
//{{AFX_MSG_MAP(CCheckSystemPlugApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCheckSystemPlugApp construction
CCheckSystemPlugApp::CCheckSystemPlugApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CCheckSystemPlugApp object
CCheckSystemPlugApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CCheckSystemPlugApp initialization
BOOL CCheckSystemPlugApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CCheckSystemPlugDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1229 2010-06-06 19:58 CheckSystemPlug\CheckSystemPlug.clw
文件 2189 2010-06-06 13:20 CheckSystemPlug\CheckSystemPlug.cpp
文件 4321 2010-06-06 13:20 CheckSystemPlug\CheckSystemPlug.dsp
文件 555 2010-06-06 13:20 CheckSystemPlug\CheckSystemPlug.dsw
文件 1423 2010-06-06 13:20 CheckSystemPlug\CheckSystemPlug.h
文件 5537 2010-06-06 13:25 CheckSystemPlug\CheckSystemPlug.rc
文件 16721 2010-06-06 19:49 CheckSystemPlug\CheckSystemPlugDlg.cpp
文件 3620 2010-06-06 19:30 CheckSystemPlug\CheckSystemPlugDlg.h
文件 3741 2010-06-06 13:20 CheckSystemPlug\ReadMe.txt
文件 49152 2010-06-06 20:00 CheckSystemPlug\Release\CheckSystemPlug.exe
文件 9898 2010-06-06 20:02 CheckSystemPlug\Release\USB设备插拔检测抓图.gif
文件 21630 2001-04-20 15:48 CheckSystemPlug\res\CheckSystemPlug.ico
文件 407 2010-06-06 13:20 CheckSystemPlug\res\CheckSystemPlug.rc2
文件 739 2010-06-06 13:24 CheckSystemPlug\resource.h
文件 217 2010-06-06 13:20 CheckSystemPlug\StdAfx.cpp
文件 1054 2010-06-06 13:20 CheckSystemPlug\StdAfx.h
目录 0 2010-06-06 20:02 CheckSystemPlug\Release
目录 0 2010-06-06 13:32 CheckSystemPlug\res
目录 0 2010-06-06 20:01 CheckSystemPlug
----------- --------- ---------- ----- ----
122433 19
相关资源
- usb hid调试工具
- HID调试助手
- USB.Over.Network.Server 注册机
- 黑苹果硬件兼容检测和查询软件
- WPF USB 网络 串口 通信软件
- USB转串口驱动,FT232R驱动程序,最新
- MFC程序-碰撞的小球
- WinCE下CP210x的驱动程序
- hidusage.h hidpi.h 等USB开发用头文件
- delphi 通过Ping命令检测网络是否正常
- 基于OpenCV的数字识别468815
- 基于JM20329的SATA转USB 1394
- 430系列单片机USBFET下载驱动
- SCA60角度检测传感器模块程序
- CY7C68013A固件程序(用于摄像机采集)
- 利用语音信号的短时能量与短时过零
- Cpu-Z检测CPU软件
- usb调试程序 对USB设备进行数据的读写
- 小波模极大值边缘检测
- 大数的四则运算和素性检测
- USB 驱动 让电脑与arm进行通信
- 关于角点检测算法HarrisForstner经典算子
- USB助手(调试USB通信协议的工具) 源
- 基于FPGA的USB接口设计
- 枚举USB设备接口(C 源代码)
- 多普达USB Modem驱动(适用于818、828、
- xianshujiancheyi
- SN9C291B datasheet
- 希捷公布USB外部硬盘解决方案
- USB调试模式一键设置
评论
共有 条评论