CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2002
    Location
    Toronto
    Posts
    21

    HD drives serial number & HD drives volume serial number

    Hi
    I am still a problem in HD drives serial number. I need to know what is difference between HD drives serial number and HD drives volume serial number. which one is unique number.
    by the way, you can see the HD drives volume serial number in DOS state(i.e. C:\Dir..), but how to find HD drives serial number. Can anybody tell me ? Thanks again

  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210
    The drive serial number is the manufacturer hard coded serial number. The volume serial number is the user supplied alpha numeric string.
    I have encloses a sample program that will display bunches of informatio about a hard drive.
    Just unzip the attached and run the project to see the difference. Debug the code to see how the results are acheived.
    Attached Files Attached Files

  3. #3
    Join Date
    Nov 2002
    Location
    Toronto
    Posts
    21

    thanks

    Hi, thank everybody
    I need to know which one is unique number between HD drives serial number and HD drives volume serial number.

    thank in advance

  4. #4
    Join Date
    Sep 2001
    Location
    Québec, Canada
    Posts
    1,923
    The GetVolumeInformation API return the Volume Serial Number, the same you see when you do "dir c:\" and the same returned by the FileSystemObject. I don't know much if there is any other Serial Number you can read, but a quick search on planetsourcecode.com do not give any other method

    JeffB
    CodeGuru VB FAQ Visual Basic Frequently Asked Questions
    VB Code color Tool to color your VB code on CodeGuru
    Before you post Importants informations to know before posting

  5. #5
    Join Date
    Nov 2002
    Location
    Toronto
    Posts
    21

    help me

    thanks John and Jeffb

    I get HD drives serial number (1730166591) in D directory using John code, but I find HD drives volume serial number(98DFC0C1) in directory using DOS operation(c:/dir..).

    Can anybody tell me which number is always not changed in computer system and how to find HD drives serial number (1730166591) in DOS or Windows operation( don't use VB code)

    thank in advance
    Last edited by Cphilip; November 27th, 2002 at 01:38 PM.

  6. #6
    Join Date
    Sep 2001
    Location
    Québec, Canada
    Posts
    1,923
    At first, you must convert the resulting value to Hexadecimal (HEX$ funcion), but in your case, it give : 67203F3F, I have try it on my HardDrive and this is always the same number...

    JeffB
    CodeGuru VB FAQ Visual Basic Frequently Asked Questions
    VB Code color Tool to color your VB code on CodeGuru
    Before you post Importants informations to know before posting

  7. #7
    Join Date
    Nov 2002
    Location
    Toronto
    Posts
    21

    Thanks

    Hi JeffB
    You are right. if you use Hex$ fuction, the HD drives serial number look like the HD drives volume serial number.
    you give me the good answer and make me understand.

    Thanks Thanhs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured