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. How to know the serial number

How to know the serial number

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
6 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.
  • R Offline
    R Offline
    Russell
    wrote on last edited by
    #1

    Hi How to know the serial number of the processor, motherboard, Hd,.... of the PC where is running my application? I found that I can obtain the HD serial number with GetVolumeInformation(), but I have problems with the other devices. Can you help me? Have a nice code day ;)

    K D 2 Replies Last reply
    0
    • R Russell

      Hi How to know the serial number of the processor, motherboard, Hd,.... of the PC where is running my application? I found that I can obtain the HD serial number with GetVolumeInformation(), but I have problems with the other devices. Can you help me? Have a nice code day ;)

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

      Hello I thought so too, but it was wrong. The serial number you get from GetVolumeInformation() is the serial number Windows assigns when the drive is formatted. That's not the same as the manufacturers serial no. (Thanks Mr Alok :)) Check this respose to the same question: http://www.codeproject.com/script/comments/forums.asp?msg=1299791&forumid=1647&mode=all&userid=394282#xx1299774xx[^] Kakan

      R 1 Reply Last reply
      0
      • R Russell

        Hi How to know the serial number of the processor, motherboard, Hd,.... of the PC where is running my application? I found that I can obtain the HD serial number with GetVolumeInformation(), but I have problems with the other devices. Can you help me? Have a nice code day ;)

        D Offline
        D Offline
        Dudi Avramov
        wrote on last edited by
        #3

        For cpu-id look for the assembly function cpuid.

        R 1 Reply Last reply
        0
        • K kakan

          Hello I thought so too, but it was wrong. The serial number you get from GetVolumeInformation() is the serial number Windows assigns when the drive is formatted. That's not the same as the manufacturers serial no. (Thanks Mr Alok :)) Check this respose to the same question: http://www.codeproject.com/script/comments/forums.asp?msg=1299791&forumid=1647&mode=all&userid=394282#xx1299774xx[^] Kakan

          R Offline
          R Offline
          Russell
          wrote on last edited by
          #4

          Thanks, but I have some problems to use the functions Win32_DiskDrive. I have to define these symbols using 'Cimwin32.mof'. But, How can I use this strange (for me :wtf:) files 'mof'? And also it needed namespace '\root\cimv2', but the compiler give some errors! If it is a problem, I'm writing a simple MFC doc\view application. Thank you Have a nice code day ;)

          T 1 Reply Last reply
          0
          • D Dudi Avramov

            For cpu-id look for the assembly function cpuid.

            R Offline
            R Offline
            Russell
            wrote on last edited by
            #5

            Thank you very much. It works! Do you know others assembly functions to know the other devices id (ram, motherboard)? Have a nice code day ;)

            1 Reply Last reply
            0
            • R Russell

              Thanks, but I have some problems to use the functions Win32_DiskDrive. I have to define these symbols using 'Cimwin32.mof'. But, How can I use this strange (for me :wtf:) files 'mof'? And also it needed namespace '\root\cimv2', but the compiler give some errors! If it is a problem, I'm writing a simple MFC doc\view application. Thank you Have a nice code day ;)

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              _Russell_ wrote:

              If it is a problem, I'm writing a simple MFC doc\view application.

              this article will help http://www.codeproject.com/system/UsingWMI.asp[^]

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta VC Forum Q&A :- I/ IV

              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