获得磁盘盘符ID

it2022-05-16  69

DWORD Serial; DWORD Length; GetVolumeInformation("D:",NULL, MAX_PATH,&Serial,&Length, NULL,NULL,MAX_PATH); CString StrSerial; StrSerial.Format("%ud",Serial); CFile logfile(_T("DiskID.log"), CFile::modeWrite|CFile::modeCreate); logfile.Write(StrSerial,StrSerial.GetLength()); logfile.Flush(); logfile.Close();

 

转载于:https://www.cnblogs.com/luyuxibaby/p/5217442.html

相关资源:C#实现读取指定盘符硬盘序列号的方法

最新回复(0)