?? hdisksn.h
字號:
USHORT wDMATiming; // 20. DMA時序
struct
{
USHORT CHSNumber:1; // 1=WORD 54-58有效
USHORT CycleNumber:1; // 1=WORD 64-70有效
USHORT UnltraDMA:1; // 1=WORD 88有效
USHORT reserved:13; // 保留
}
wFieldValidity; // 21. 后續字段有效性標志
USHORT wNumCurrentCyls; // 22. CHS可尋址的柱面數
USHORT wNumCurrentHeads; // 23. CHS可尋址的磁頭數
USHORT wNumCurrentSectorsPerTrack; // 24. CHS可尋址每磁道扇區數
ULONG ulCurrentSectorCapacity; // 25. CHS可尋址的扇區數
struct
{
USHORT CurNumber:8; // 當前一次性可讀寫扇區數
USHORT Multi:1; // 1=已選擇多扇區讀寫
USHORT reserved1:7; // 保留
}
wMultSectorStuff; // 26. 多扇區讀寫設定
ULONG ulTotalAddressableSectors; // 27. LBA可尋址的扇區數
USHORT wSingleWordDMA; // 28. 單字節DMA支持能力
struct
{
USHORT Mode0:1; // 1=支持模式0 (4.17Mb/s)
USHORT Mode1:1; // 1=支持模式1 (13.3Mb/s)
USHORT Mode2:1; // 1=支持模式2 (16.7Mb/s)
USHORT Reserved1:5; // 保留
USHORT Mode0Sel:1; // 1=已選擇模式0
USHORT Mode1Sel:1; // 1=已選擇模式1
USHORT Mode2Sel:1; // 1=已選擇模式2
USHORT Reserved2:5; // 保留
}
wMultiWordDMA; // 29. 多字節DMA支持能力
struct
{
USHORT AdvPOIModes:8; // 支持高級POI模式數
USHORT reserved:8; // 保留
}
wPIOCapacity; // 30. 高級PIO支持能力
USHORT wMinMultiWordDMACycle; // 31. 多字節DMA傳輸周期的最小值
USHORT wRecMultiWordDMACycle; // 32. 多字節DMA傳輸周期的建議值
USHORT wMinPIONoFlowCycle; // 33. 無流控制時PIO傳輸周期的最小值
USHORT wMinPOIFlowCycle; // 34. 有流控制時PIO傳輸周期的最小值
USHORT wReserved2[11]; // 35. 保留
struct
{
USHORT Reserved1:1;
USHORT ATA1:1; // 1=支持ATA-1
USHORT ATA2:1; // 1=支持ATA-2
USHORT ATA3:1; // 1=支持ATA-3
USHORT ATA4:1; // 1=支持ATA/ATAPI-4
USHORT ATA5:1; // 1=支持ATA/ATAPI-5
USHORT ATA6:1; // 1=支持ATA/ATAPI-6
USHORT ATA7:1; // 1=支持ATA/ATAPI-7
USHORT ATA8:1; // 1=支持ATA/ATAPI-8
USHORT ATA9:1; // 1=支持ATA/ATAPI-9
USHORT ATA10:1; // 1=支持ATA/ATAPI-10
USHORT ATA11:1; // 1=支持ATA/ATAPI-11
USHORT ATA12:1; // 1=支持ATA/ATAPI-12
USHORT ATA13:1; // 1=支持ATA/ATAPI-13
USHORT ATA14:1; // 1=支持ATA/ATAPI-14
USHORT Reserved2:1; // 保留
}
wMajorVersion; // 36. 主版本
USHORT wMinorVersion; // 37. 副版本
USHORT wReserved3[6]; // 38. 保留
struct
{
USHORT Mode0:1; // 1=支持模式0 (16.7Mb/s)
USHORT Mode1:1; // 1=支持模式1 (25Mb/s)
USHORT Mode2:1; // 1=支持模式2 (33Mb/s)
USHORT Mode3:1; // 1=支持模式3 (44Mb/s)
USHORT Mode4:1; // 1=支持模式4 (66Mb/s)
USHORT Mode5:1; // 1=支持模式5 (100Mb/s)
USHORT Mode6:1; // 1=支持模式6 (133Mb/s)
USHORT Mode7:1; // 1=支持模式7 (166Mb/s) ???
USHORT Mode0Sel:1; // 1=已選擇模式0
USHORT Mode1Sel:1; // 1=已選擇模式1
USHORT Mode2Sel:1; // 1=已選擇模式2
USHORT Mode3Sel:1; // 1=已選擇模式3
USHORT Mode4Sel:1; // 1=已選擇模式4
USHORT Mode5Sel:1; // 1=已選擇模式5
USHORT Mode6Sel:1; // 1=已選擇模式6
USHORT Mode7Sel:1; // 1=已選擇模式7
}
wUltraDMA; // 39. Ultra DMA支持能力
USHORT wReserved4[167]; // 40. 保留
}
IDSECTOR, *PIDSECTOR;
//-------------------------------------------------------------------------//
// SCSI驅動所需的輸入輸出共用的結構
typedef struct _SRB_IO_CONTROL
{
ULONG HeaderLength; // 頭長度
UCHAR Signature[8]; // 特征名稱
ULONG Timeout; // 超時時間
ULONG ControlCode; // 控制碼
ULONG ReturnCode; // 返回碼
ULONG Length; // 緩沖區長度
}
SRB_IO_CONTROL, *PSRB_IO_CONTROL;
#define SRB_IOBUFF_SIZE (sizeof(SRB_IO_CONTROL) + sizeof(SENDCMDOUTPARAMS))
//-------------------------------------------------------------------------//
// 模擬的32位寄存器:DeviceIoControl入口參數
typedef struct _DEVIOCTL_REGISTERS
{
DWORD EBX;
DWORD EDX;
DWORD ECX;
DWORD EAX;
DWORD EDI;
DWORD ESI;
DWORD Flags;
}
DEVIOCTL_REGISTERS, *PDEVIOCTL_REGISTERS;
// 在DS:BX寄存器所采用的磁盤IO結構(在Windows下不用設置DS)
typedef struct _DEVIOCTL_DISKIOPACK
{
DWORD dwStartSector;
WORD wSectors;
BYTE *lpBuffer;
}
DEVIOCTL_DISKIOPACK, *PDEVIOCTL_DISKIOPACK;
// 自定義的LONGLONG結構,用于提取64位的高32位和低32位
typedef union _SCK_LARGE_INTEGER
{
struct
{
DWORD Low;
LONG High;
} u;
LONGLONG Quad;
}
SCK_LARGE_INTEGER;
//-------------------------------------------------------------------------//
typedef struct type_sdeffsd_req_usage
{
USHORT _IOR_ioctl_drive;
USHORT _IOR_ioctl_function ;
ULONG _IOR_ioctl_control_param ;
ULONG _IOR_ioctl_buffer_ptr;
ULONG _IOR_ioctl_client_params;
ULONG _IOR_ioctl_return;
}
_type_sdeffsd_req_usage;
typedef union urequestor_usage
{
ULONG _IOR_requestor_usage[5];
struct type_sdeffsd_req_usage sdeffsd_req_usage;
}
_urequestor_usage;
typedef void (* CMDCPLT)(void);
// IOR (I/O Request Descriptor) Data Structure
typedef struct _IOR
{
ULONG IOR_next; // client link for BCB's (MBZ for IORF_VERSION_002)
USHORT IOR_func; // function to be performed - see defines below
USHORT IOR_status; // request status - see defines below
ULONG IOR_flags; // request control flags - see defines below
CMDCPLT IOR_callback; // address to call request back to if
// IORF_SYNC_COMMAND is not set
ULONG IOR_start_addr[2]; // volume relative starting addr
ULONG IOR_xfer_count; // number of sectors to process if
ULONG IOR_buffer_ptr; // BlockDev client buffer pointer
ULONG IOR_private_client; // BlockDev/IOS client reserved
ULONG IOR_private_IOS; // reserved space for IOS
ULONG IOR_private_port; // private area for port driver
union urequestor_usage _ureq;// requestor usage area, also used for IOCTL's
ULONG IOR_req_req_handle; // requestor provided request
ULONG IOR_req_vol_handle; // requestor provided media handle
ULONG IOR_sgd_lin_phys; // pointer to first physical SGD
UCHAR IOR_num_sgds; // number of phys SGD's pointed
UCHAR IOR_vol_designtr; // numeric representation of the drive letter
USHORT IOR_ios_private_1; // reserved by IOS to force alignment
ULONG IOR_reserved_2[2]; // reserved for internal use
}
IOR, *PIOR;
//-------------------------------------------------------------------------//
#define IOR_READ 0x0000 // Reads sectors/bytes as specified in IOR_xfer_count
#define IOR_WRITE 0x0001 // Writes sectors/bytes as specified in IOR_xfer_count
#define IORF_PHYS_CMD 0x40000000 // indicates I/O is for a physical device
#define IORF_VERSION_002 0x0400 // indicates use of extended BCB (IOR) format request
#define IORF_SYNC_COMMAND 0x0100 // indicates synchronous command complete before return
#define IORF_HIGH_PRIORITY 0x0001 // binary priority indication
// 自定義輸入命令緩沖區結構:用于控制DiskIO.VXD的操作
typedef struct _SckInputOrder
{
BOOL bOperation; // False:Read, True:Write
BYTE byWhichDisk; // 0x00軟盤,0x80硬盤
UINT uiStartSecLo, uiStartSecHi; // 開始扇區 結束扇區
UINT uiSumSectors; // 扇區數
}
SckInputOrder, *PSckInputOrder;
//-------------------------------------------------------------------------//
#define TCSY_GETITEMCOUNT 0x00 // 獲取單元總數
#define TCSY_GETTCSYHEAD 0x01 // 獲取鏈表標頭
#define TCSY_FINDLISTHEAD 0x02 // 搜索鏈表標頭
#define TCSY_LOADLIST 0x03 // 裝載信息鏈表
#define TCSY_ADDEND 0x04 // 尾部追加數據
#define TCSY_READCURR 0x05 // 讀取當前節點
#define TCSY_WRITECURR 0x06 // 寫入當前節點
#define TCSY_DELETECURR 0x07 // 刪除當前節點
#define TCSY_REWINDCURR 0x08 // 當前到首或尾
#define TCSY_CURRTOPRIOR 0x09 // 當前到上一點
#define TCSY_CURRTONEXT 0x0A // 當前到下一點
#define TCSY_DIRECTDELETE 0x0B // 直接刪除單元
#define TCSY_REMOVELISTALL 0x0C // 卸載鏈表全部
#define TCSY_SETDETECTFREQ 0x0D // 設置監視頻率
#define TCSY_SETFIRSTREGIST 0x0E // 首次是否注冊
#define TCSY_REGISTPRODUCT 0x0F // 注冊軟件產品
#define TCSY_DIYREGISTSOFT 0x10 // 自定唯一標識
/////////////////////////////////////////////////////////////////////////////
#endif // #ifndef HDISK_SN_H
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -