04 2013 档案

摘要:上一回,一帆风给大家讲了讲如何读取计算机的MAC地址,这次聊聊怎么获取硬盘序列号。硬盘物理序列号是硬盘的出厂序列号,它是全球都是唯一的,不会随着系统的安装、硬盘的格式化等操作而改变,跟mac地址一样都具有唯一性。1,第一步:创建设备对象,得到设备句柄,设备为硬盘。{CString sFilePath;sFilePath.Format("\\\\.\\PHYSICALDRIVE%d", driver);HANDLE hFile=::CreateFile(sFilePath,GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_ 阅读全文
posted @ 2013-04-07 13:27 _行云_ 阅读(734) 评论(0) 推荐(0)
摘要:参考:http://www.winsim.com/diskid32/diskid32.cpp// diskid32.cpp // for displaying the details of hard drives in a command window // 06/11/00 Lynn McGuire written with many contributions from others, // IDE drives only under Windows NT/2K and 9X, // ... 阅读全文
posted @ 2013-04-07 13:21 _行云_ 阅读(1529) 评论(0) 推荐(0)