資源簡介
vc6.0編寫的usbhid通信的上位機
venderID=0x0483; //與單片機的廠商號,設備號 對應productID=0x5750;
只能在代碼中更改!
具體可查看文件中的readme.doc。

代碼片段和文件信息
//?DlgProxy.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“UsbPort.h“
#include?“DlgProxy.h“
#include?“UsbPortDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CUsbPortDlgAutoProxy
IMPLEMENT_DYNCREATE(CUsbPortDlgAutoProxy?CCmdTarget)
CUsbPortDlgAutoProxy::CUsbPortDlgAutoProxy()
{
EnableAutomation();
//?To?keep?the?application?running?as?long?as?an?automation?
// object?is?active?the?constructor?calls?AfxOleLockApp.
AfxOleLockApp();
//?Get?access?to?the?dialog?through?the?application‘s
//??main?window?pointer.??Set?the?proxy‘s?internal?pointer
//??to?point?to?the?dialog?and?set?the?dialog‘s?back?pointer?to
//??this?proxy.
ASSERT?(AfxGetApp()->m_pMainWnd?!=?NULL);
ASSERT_VALID?(AfxGetApp()->m_pMainWnd);
ASSERT_KINDOF(CUsbPortDlg?AfxGetApp()->m_pMainWnd);
m_pDialog?=?(CUsbPortDlg*)?AfxGetApp()->m_pMainWnd;
m_pDialog->m_pAutoProxy?=?this;
}
CUsbPortDlgAutoProxy::~CUsbPortDlgAutoProxy()
{
//?To?terminate?the?application?when?all?objects?created?with
//? with?automation?the?destructor?calls?AfxOleUnlockApp.
//??Among?other?things?this?will?destroy?the?main?dialog
if?(m_pDialog?!=?NULL)
m_pDialog->m_pAutoProxy?=?NULL;
AfxOleUnlockApp();
}
void?CUsbPortDlgAutoProxy::OnFinalRelease()
{
//?When?the?last?reference?for?an?automation?object?is?released
//?OnFinalRelease?is?called.??The?base?class?will?automatically
//?deletes?the?object.??Add?additional?cleanup?required?for?your
//?object?before?calling?the?base?class.
CCmdTarget::OnFinalRelease();
}
BEGIN_MESSAGE_MAP(CUsbPortDlgAutoProxy?CCmdTarget)
//{{AFX_MSG_MAP(CUsbPortDlgAutoProxy)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CUsbPortDlgAutoProxy?CCmdTarget)
//{{AFX_DISPATCH_MAP(CUsbPortDlgAutoProxy)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
//?Note:?we?add?support?for?IID_IUsbPort?to?support?typesafe?binding
//??from?VBA.??This?IID?must?match?the?GUID?that?is?attached?to?the?
//??dispinterface?in?the?.ODL?file.
//?{68C7D0FF-B39F-4082-A50B-0F1837EF1717}
static?const?IID?IID_IUsbPort?=
{?0x68c7d0ff?0xb39f?0x4082?{?0xa5?0xb?0xf?0x18?0x37?0xef?0x17?0x17?}?};
BEGIN_INTERFACE_MAP(CUsbPortDlgAutoProxy?CCmdTarget)
INTERFACE_PART(CUsbPortDlgAutoProxy?IID_IUsbPort?Dispatch)
END_INTERFACE_MAP()
//?The?IMPLEMENT_OLECREATE2?macro?is?defined?in?StdAfx.h?of?this?project
//?{EEF09E21-D13D-4E5A-B323-7387A374843E}
IMPLEMENT_OLECREATE2(CUsbPortDlgAutoProxy?“UsbPort.Application“?0xeef09e21?0xd13d?0x4e5a?0xb3?0x23?0x73?0x87?0xa3?0x74?0x84?0x3e)
/////////////////////////////////////////////////////////////////////////////
//?CUsbPortDlgAutoProxy?message?handlers
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????6381??2006-09-13?08:55??vcMfcUsbPort完整上位機源碼\ba
?????文件??????20306??2013-10-18?11:10??vcMfcUsbPort完整上位機源碼\Debug\DlgProxy.obj
?????文件??????????0??2013-10-18?11:10??vcMfcUsbPort完整上位機源碼\Debug\DlgProxy.sbr
?????文件?????105328??2013-09-29?13:55??vcMfcUsbPort完整上位機源碼\Debug\StdAfx.obj
?????文件????1366524??2013-09-29?13:55??vcMfcUsbPort完整上位機源碼\Debug\StdAfx.sbr
?????文件????3818496??2013-10-18?16:26??vcMfcUsbPort完整上位機源碼\Debug\UsbPort.bsc
?????文件?????118838??2013-10-18?16:26??vcMfcUsbPort完整上位機源碼\Debug\UsbPort.exe
?????文件?????307032??2013-10-18?16:26??vcMfcUsbPort完整上位機源碼\Debug\UsbPort.ilk
?????文件??????12762??2013-10-18?11:10??vcMfcUsbPort完整上位機源碼\Debug\UsbPort.obj
?????文件????6941528??2013-09-29?13:55??vcMfcUsbPort完整上位機源碼\Debug\UsbPort.pch
?????文件?????443392??2013-10-18?16:26??vcMfcUsbPort完整上位機源碼\Debug\UsbPort.pdb
?????文件???????2852??2013-10-18?10:05??vcMfcUsbPort完整上位機源碼\Debug\UsbPort.res
?????文件??????????0??2013-10-18?11:10??vcMfcUsbPort完整上位機源碼\Debug\UsbPort.sbr
?????文件???????1476??2013-10-18?11:10??vcMfcUsbPort完整上位機源碼\Debug\UsbPort.tlb
?????文件??????48678??2013-10-18?16:26??vcMfcUsbPort完整上位機源碼\Debug\UsbPortDlg.obj
?????文件??????????0??2013-10-18?16:26??vcMfcUsbPort完整上位機源碼\Debug\UsbPortDlg.sbr
?????文件?????214016??2013-10-21?21:19??vcMfcUsbPort完整上位機源碼\Debug\vc60.idb
?????文件?????389120??2013-10-18?16:26??vcMfcUsbPort完整上位機源碼\Debug\vc60.pdb
?????文件???????2988??2013-09-29?09:02??vcMfcUsbPort完整上位機源碼\DlgProxy.cpp
?????文件???????1650??2013-09-29?09:02??vcMfcUsbPort完整上位機源碼\DlgProxy.h
?????文件??????12384??2001-08-17?12:39??vcMfcUsbPort完整上位機源碼\HID\hid.lib
?????文件??????11028??2001-08-17?14:12??vcMfcUsbPort完整上位機源碼\HID\hidusage.h
?????文件?????141048??2001-07-21?18:48??vcMfcUsbPort完整上位機源碼\HID\setupapi.lib
?????文件??????11394??2006-09-13?08:55??vcMfcUsbPort完整上位機源碼\hid.lib
?????文件???????4224??2006-09-13?08:55??vcMfcUsbPort完整上位機源碼\hidclass.h
?????文件???????1766??2006-09-13?08:55??vcMfcUsbPort完整上位機源碼\hidclass.lib
?????文件???????9212??2006-09-13?08:55??vcMfcUsbPort完整上位機源碼\hidparse.lib
?????文件???????9500??2006-09-13?08:55??vcMfcUsbPort完整上位機源碼\hidpddi.h
?????文件??????80537??2006-09-13?08:55??vcMfcUsbPort完整上位機源碼\hidpi.h
?????文件??????12126??2006-09-13?08:55??vcMfcUsbPort完整上位機源碼\hidsdi.h
............此處省略32個文件信息
- 上一篇:RFID讀寫器的程序
- 下一篇:傅里葉變換研究|C++源碼|帶通濾波器
評論
共有 條評論