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. HDD image

HDD image

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++linuxtools
3 Posts 2 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.
  • N Offline
    N Offline
    nutkase
    wrote on last edited by
    #1

    Hi, Just needed a little guidance. Am creating a drive imaging utility mostly to understand the working. Can anyone guide me to a tutorial/example to make images of HDD on windows/linux using C/C++. Just the right direction will suffice. I tried googling it but all i get are the softwares to create the images not the actually approach to the problems. thanks.

    H 1 Reply Last reply
    0
    • N nutkase

      Hi, Just needed a little guidance. Am creating a drive imaging utility mostly to understand the working. Can anyone guide me to a tutorial/example to make images of HDD on windows/linux using C/C++. Just the right direction will suffice. I tried googling it but all i get are the softwares to create the images not the actually approach to the problems. thanks.

      H Offline
      H Offline
      hoxsiew
      wrote on last edited by
      #2

      In linux, it is easy, just open the proper device. A raw harddisk is represented by say /dev/hda where as the partitions are represented by /dev/hda1, /dev/hda2, etc. Just open the file with fopen and use fread to read the data. In WinNT (to include subsequent versions such as XP, etc) you can actually open device files the same way, but it is a lot messier. The NT kernel creates pseudo files like linux, but they are not as neatly grouped. They look like \\.\Volume{46b98f60-4a74-11dc-9364-806d6172696f}\ but have simpler aliases like \\?\Device\HarddiskVolume2 There is a open source program called rawwrite dd for windows that does just what you require and maybe you can glean some information from the authors homepage or from the source code: http://uranus.it.swin.edu.au/~jn/linux/rawwrite-old.htm[^]

      N 1 Reply Last reply
      0
      • H hoxsiew

        In linux, it is easy, just open the proper device. A raw harddisk is represented by say /dev/hda where as the partitions are represented by /dev/hda1, /dev/hda2, etc. Just open the file with fopen and use fread to read the data. In WinNT (to include subsequent versions such as XP, etc) you can actually open device files the same way, but it is a lot messier. The NT kernel creates pseudo files like linux, but they are not as neatly grouped. They look like \\.\Volume{46b98f60-4a74-11dc-9364-806d6172696f}\ but have simpler aliases like \\?\Device\HarddiskVolume2 There is a open source program called rawwrite dd for windows that does just what you require and maybe you can glean some information from the authors homepage or from the source code: http://uranus.it.swin.edu.au/~jn/linux/rawwrite-old.htm[^]

        N Offline
        N Offline
        nutkase
        wrote on last edited by
        #3

        Thanks ... :)

        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