📄 usbif.h
字号:
/************************************************************************
*
* Module: UsbIF.h
* Description: CUsbIF base device class definition
* Company: Cygnal Integrated Products
*
************************************************************************/
#ifndef __UsbIF_H__
#define __UsbIF_H__
// get setup API functions (only available in Win98 and Win2K)
#include <setupapi.h>
// requires to link with setupapi.lib
// Link with SetupAPI.Lib.
#pragma comment (lib, "setupapi.lib")
#include "usb100.h"
///////////////////////////////////////////////////////////////////////////////
class CDeviceListEntry
{ // class CDeviceListEntry
public:
CDeviceListEntry(LPCTSTR linkname, LPCTSTR friendlyname);
CDeviceListEntry(){}
CString m_linkname;
CString m_friendlyname;
}; // class CDeviceListEntry
#endif // _UsbIF_h_
//
// CUsbIF
//
// This class implements the interface to the Cygnal USB device driver.
//
class CUsbIF
{
public:
// standard constructor
CUsbIF();
// destructor, should be virtual
virtual ~CUsbIF();
CArray<CDeviceListEntry, CDeviceListEntry&> m_list; // list of devices
char m_DeviceName[256];
// implementation
void SetGUID(GUID newGUID);
BOOL OpenUsbDevice();
HANDLE open_file( char *filename);
CString GetSerialNumber(LPCTSTR DevicePath);
protected:
GUID m_GUID;
private:
}; // class CUsbIF
/*************************** EOF **************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -