udiskclassify.h

来自「Get Product Model and Product Vendor of 」· C头文件 代码 · 共 62 行

H
62
字号
/**
* File
*	UDiskClassify.h
* Brief
*	CUDiskClassify - exported class from UDiskClassify.dll
* Author
*	Zo Yong Min
*************************************************************/


#ifndef ____UDISKCLASSIFY__H____
#define ____UDISKCLASSIFY__H____


#include <winioctl.h>

// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the UDISKCLASSIFY_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// UDISKCLASSIFY_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef UDISKCLASSIFY_EXPORTS
#define UDISKCLASSIFY_API __declspec(dllexport)
#else
#define UDISKCLASSIFY_API __declspec(dllimport)
#endif


#define MAX_UD			26


typedef struct {
	char MoveDiskName;
	char VendorId[VENDOR_ID_LENGTH+1];
	char ProductId[PRODUCT_ID_LENGTH+1];
	char ProductRevision[REVISION_LENGTH+1];
	char SerialNumber[SERIAL_NUMBER_LENGTH+1];
} UDISK_INFO;


class UDISKCLASSIFY_API CUDiskClassify
{
public:
	CUDiskClassify();
	void		ScanUDisk();
	int			GetUDiskCount();
	UDISK_INFO	*GetUDiskInfo();

private:
	BOOL		GetDisksProperty(HANDLE hDevice, PSTORAGE_DEVICE_DESCRIPTOR pDevDesc);
	char		chFirstDriveFromMask(ULONG unitmask);

private:
	int			m_udnum;
	UDISK_INFO	m_udi[MAX_UD];
};



#endif //____UDISKCLASSIFY__H____

⌨️ 快捷键说明

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