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. Hardware & Devices
  4. hard disk

hard disk

Scheduled Pinned Locked Moved Hardware & Devices
5 Posts 5 Posters 14 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.
  • J Offline
    J Offline
    jitenderbansal
    wrote on last edited by
    #1

    hi, how i am get serial of my hard disk.

    S H S 3 Replies Last reply
    0
    • J jitenderbansal

      hi, how i am get serial of my hard disk.

      S Offline
      S Offline
      stanlymt
      wrote on last edited by
      #2

      DWORD GetSerialNumber(int nDrive) { DWORD dwHDSerialNum = 0; if (!GetVolumeInformation(GetRoot(nDrive), NULL, 0, &dwHDSerialNum,NULL,NULL, NULL, 0)) return (DWORD)-1; return dwHDSerialNum; }

      E 1 Reply Last reply
      0
      • S stanlymt

        DWORD GetSerialNumber(int nDrive) { DWORD dwHDSerialNum = 0; if (!GetVolumeInformation(GetRoot(nDrive), NULL, 0, &dwHDSerialNum,NULL,NULL, NULL, 0)) return (DWORD)-1; return dwHDSerialNum; }

        E Offline
        E Offline
        Ed Poore
        wrote on last edited by
        #3

        Not the true serial number, for that (I think) you have to go through WMI. What this gets is Windows internal Volume ID which may change randomly (reformatting of disk etc)


        Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9 Ed

        1 Reply Last reply
        0
        • J jitenderbansal

          hi, how i am get serial of my hard disk.

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          See Here[^] maybe it is some helpful to you

          _**


          **_

          WhiteSky


          1 Reply Last reply
          0
          • J jitenderbansal

            hi, how i am get serial of my hard disk.

            S Offline
            S Offline
            scott roger
            wrote on last edited by
            #5

            Open the Start menu and search for Command Prompt. Launch Command Prompt. Inside Command Prompt, type the following command and press Enter: wmic diskdrive get model,serialnumber. Command Prompt will return the models and serial numbers of your hard disks. If you are not getting the serial number then purchase the new HDD using Hard Disk Direct Discount Code 35% OFF on each hard disk.

            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