Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. retrieve the harddisk serial number

retrieve the harddisk serial number

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vgkotha
    wrote on last edited by
    #1

    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

    K K D 3 Replies Last reply
    0
    • V vgkotha

      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

      K Offline
      K Offline
      KarstenK
      wrote on last edited by
      #2

      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 );

      1 Reply Last reply
      0
      • V vgkotha

        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

        K Offline
        K Offline
        Kannan Kalyanaraman
        wrote on last edited by
        #3

        Probably you should try exploring Windows Management Instrumentation. I've seen lot of stuff related to hardware over there... Cheers Kannan

        1 Reply Last reply
        0
        • V vgkotha

          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

          D Offline
          D Offline
          Daniel Turini
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups