retrieve the harddisk serial number
-
hi how can i fetch the harddisk serial number not harddisk volume serial number using MFC, WIN32API,C,C++ program. And where it is stored in the system. any professionals know please help me thank you from venu
I have this: CString csRoot( "C:\\" ); DWORD max = _MAX_PATH; DWORD maxLen = 0; DWORD fileFlags; DWORD serialNo; char szName[ _MAX_PATH ]; char szSerialNo[ _MAX_PATH ]; char szFileSystem[ _MAX_PATH ]; ::GetVolumeInformation( 0, // root directory szName, // volume name buffer _MAX_PATH, // length of name buffer &serialNo, // volume serial number &maxLen, // maximum file name length &fileFlags, // file system options szFileSystem, // file system name buffer max // length of file system name buffer );
-
hi how can i fetch the harddisk serial number not harddisk volume serial number using MFC, WIN32API,C,C++ program. And where it is stored in the system. any professionals know please help me thank you from venu
Probably you should try exploring Windows Management Instrumentation. I've seen lot of stuff related to hardware over there... Cheers Kannan
-
hi how can i fetch the harddisk serial number not harddisk volume serial number using MFC, WIN32API,C,C++ program. And where it is stored in the system. any professionals know please help me thank you from venu
IMHO, be careful, this is not a good unique identifier: 1. What if you have a SCSI disk? 2. What if you have a RAID controller? 3. What if your user changes disks? 4. What if you have a Shark or EMC SAN disk array? And so more what ifs... My latest articles: XOR tricks for RAID data protection Win32 process suspend/resume tool