📄 testusbdlg.h
字号:
// TestUsbDlg.h : header file
//
#if !defined(AFX_TESTUSBDLG_H__861F6515_FCCC_4C38_AE80_BC6416200252__INCLUDED_)
#define AFX_TESTUSBDLG_H__861F6515_FCCC_4C38_AE80_BC6416200252__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CTestUsbDlg dialog
//#include "ioctl.h"
#include "usb100.h"
#include "usbioctl.h"
#include "usbdi.h"
#include "Rwbulk.h"
#include "Ioctl.h"
#include "devioctl.h"
class CTestUsbDlg;
struct CThreadParam {
HANDLE hThread;
CTestUsbDlg* testDlg;
BOOLEAN bInThread;
BOOLEAN bUpdate;
UINT uiLength;
ULONG ulCount;
ULONG ulData[3];
ULONG cur_rate;
ULONG max_rate;
ULONG total_time;
unsigned char * pcIoBuffer;
char driver_name[20];
char pipe_name[20];
};
#define D12_DRIVERLOAD 0x01
#define D12_DRIVERUNLOAD 0x02
#define D12_KEYSTATUS 0x04
class CTestUsbDlg : public CDialog
{
// Construction
public:
CTestUsbDlg(CWnd* pParent = NULL); // standard constructor
HANDLE hDevice;
CThreadParam m_MainRead, m_MainWrite, m_ReadWrite, m_InterruptIn, m_GenericOut;
// HANDLE hFile;
char* usbDescriptorTypeString(UCHAR bDescriptorType);
char* usbConfigAttributesString(UCHAR bmAttributes);
char* usbEndPointTypeString(UCHAR bmAttributes);
void print_USB_ENDPOINT_DESCRIPTOR(PUSB_ENDPOINT_DESCRIPTOR ed, int i);
void print_USB_INTERFACE_DESCRIPTOR(PUSB_INTERFACE_DESCRIPTOR id, UINT ix);
void print_USB_CONFIGURATION_DESCRIPTOR(PUSB_CONFIGURATION_DESCRIPTOR cd);
// Dialog Data
//{{AFX_DATA(CTestUsbDlg)
enum { IDD = IDD_TESTUSB_DIALOG };
CString m_strDisplay;
CString m_keystatus;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTestUsbDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CTestUsbDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnButton1();
afx_msg void OnButton2();
virtual void OnCancel();
afx_msg void OnButton3();
afx_msg void OnButton4();
afx_msg void OnButton6();
afx_msg void OnButton5();
afx_msg void OnButton7();
afx_msg void OnButton8();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnButton9();
afx_msg void OnButton10();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TESTUSBDLG_H__861F6515_FCCC_4C38_AE80_BC6416200252__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -