⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usbdetectid.h

📁 可以检测到插入到USB的设备的插入或者拔出
💻 H
字号:
// UsbDetectID.h : main header file for the USBDETECTID application
//

#if !defined(AFX_USBDETECTID_H__4FBFFA45_C6EA_42F6_B1CB_1D840271F068__INCLUDED_)
#define AFX_USBDETECTID_H__4FBFFA45_C6EA_42F6_B1CB_1D840271F068__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols
#include <usbioctl.h>

/////////////////////////////////////////////////////////////////////////////
// CUsbDetectIDApp:
// See UsbDetectID.cpp for the implementation of this class
//

#define	WINVER_WINOTHER 0
#define	WINVER_WIN95 1
#define	WINVER_WIN98 2
#define	WINVER_WINNT 3
#define	WINVER_WIN2K 4

struct struBUTTONSET
{
	char m_szBmpFileName[_MAX_PATH];
	char m_szSoundFileName[_MAX_PATH];
	char m_szact[_MAX_PATH];
};

struct struMENUSET
{
	CStringArray m_aMenuStr;
	CStringArray m_aMenuAct;
};

struct struUSB_ID
{
	bool	m_bFound;
	UINT	m_nVID;
	UINT	m_nPID;
	char	m_szIniFileName[_MAX_PATH];

	// --------
	char	m_szBKfile[_MAX_PATH];	// 背景图片名称
	char	m_szExitfile[_MAX_PATH];	// 退出按钮文件名
	char	m_szSound[_MAX_PATH];	// 声音文件名

	struBUTTONSET *m_pButtonSet;
	UINT	m_nMaxButtonNum;

	struMENUSET *m_pMenuSet;
};

extern	struUSB_ID *g_pUsbID;
extern	UINT g_nTotalDetectNum;
extern	UINT g_nCurUsbId;


/*
extern	struBUTTONSET *g_pButtonSet;
extern	UINT g_nMaxButtonNum;

extern	char	g_szBKfile[_MAX_PATH];	// 背景图文件名
extern	char	g_szExitfile[_MAX_PATH];	// 退出按钮文件名
extern	char	g_szSound[_MAX_PATH];	// 声音

extern	BOOL	g_bIsOpened;
extern	BOOL	g_bIsOpenAbout;

extern	struMENUSET *g_pMenuSet;
*/

void ReadIni();

class CUsbDetectIDApp : public CWinApp
{
public:
	CUsbDetectIDApp();

	DWORD GetSystemVersion();
	void SearchID();


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CUsbDetectIDApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CUsbDetectIDApp)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_USBDETECTID_H__4FBFFA45_C6EA_42F6_B1CB_1D840271F068__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -