查看单个帖子
旧 2008-05-03, 01:47 PM   #3
huangyhg
超级版主
 
huangyhg的头像
 
注册日期: 04-03
帖子: 18592
精华: 36
现金: 249466 标准币
资产: 1080358888 标准币
huangyhg 向着好的方向发展
默认 回复: 【转帖】displaying the details of hard drives

3) winio.h
#ifndef WINIO_H
#define WINIO_H
// Define the various device type values. Note that values used by Microsoft
// Corporation are in the range 0-32767, and 32768-65535 are reserved for use
// by customers.
#define FILE_DEVICE_WINIO 0x00008010
// Macro definition for defining IOCTL and FSCTL function control codes.
// Note that function codes 0-2047 are reserved for Microsoft Corporation,
// and 2048-4095 are reserved for customers.
#define WINIO_IOCTL_INDEX 0x810
// Define our own private IOCTL
#define IOCTL_WINIO_MAPPHYSTOLIN CTL_CODE(FILE_DEVICE_WINIO, \
WINIO_IOCTL_INDEX, \
METHOD_BUFFERED, \
FILE_ANY_ACCESS)
#define IOCTL_WINIO_UNMAPPHYSADDR CTL_CODE(FILE_DEVICE_WINIO, \
WINIO_IOCTL_INDEX + 1, \
METHOD_BUFFERED, \
FILE_ANY_ACCESS)
#define IOCTL_WINIO_WRITEPORT CTL_CODE(FILE_DEVICE_WINIO, \
WINIO_IOCTL_INDEX + 2, \
METHOD_BUFFERED, \
FILE_ANY_ACCESS)
#define IOCTL_WINIO_READPORT CTL_CODE(FILE_DEVICE_WINIO, \
WINIO_IOCTL_INDEX + 3, \
METHOD_BUFFERED, \
FILE_ANY_ACCESS)
struct tagPhys32Struct
{
HANDLE PhysicalMemoryHandle;
ULONG dwPhysMemSizeInBytes;
PVOID pvPhysAddress;
PVOID pvPhysMemLin;
};
extern struct tagPhys32Struct Phys32Struct;
struct tagPort32Struct
{
USHORT wPortAddr;
ULONG dwPortVal;
UCHAR bSize;
};
extern struct tagPort32Struct Port32Struct;
#endif
__________________
借用达朗贝尔的名言:前进吧,你会得到信心!
[url="http://www.dimcax.com"]几何尺寸与公差标准[/url]
huangyhg离线中   回复时引用此帖