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. Overwrite file and delete file/folder driver

Overwrite file and delete file/folder driver

Scheduled Pinned Locked Moved Hardware & Devices
questionc++hardwarehelptutorial
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.
  • B Offline
    B Offline
    Brandon X12000
    wrote on last edited by
    #1

    Hello all, I'm creating a software called nuclearBoot which, removes the operating system and an option for the user to keep his/her documents or include them in the process as well for erasing sensitive information and data, basically wiping the HDD completely clear, my question is how do you overwrite and delete a file using a driver? And how to tell what the operating system is? Also, I've heard online, that if the hardware in the computer is bad, it will result in a kernel panic, while bootstrapping and activating a HDD clearing software. So any questions on how to make the software still do it's job, even though the hardware is bad or avoid a kernel panic or any other generic fatal error?

    Simple Thanks and Regards, Brandon T. H. Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

    L 1 Reply Last reply
    0
    • B Brandon X12000

      Hello all, I'm creating a software called nuclearBoot which, removes the operating system and an option for the user to keep his/her documents or include them in the process as well for erasing sensitive information and data, basically wiping the HDD completely clear, my question is how do you overwrite and delete a file using a driver? And how to tell what the operating system is? Also, I've heard online, that if the hardware in the computer is bad, it will result in a kernel panic, while bootstrapping and activating a HDD clearing software. So any questions on how to make the software still do it's job, even though the hardware is bad or avoid a kernel panic or any other generic fatal error?

      Simple Thanks and Regards, Brandon T. H. Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Brandon T. H. wrote:

      how do you overwrite and delete a file using a driver?

      You would probably need to read the file tables from which you can get information about which sectors a specific file occupies. This information is proprietary to each file system type, NTFS etc: Google will find you lots of references.

      Brandon T. H. wrote:

      And how to tell what the operating system is?

      You will already know this as your driver will need to be customised to each OS.

      Brandon T. H. wrote:

      I've heard online, that if the hardware in the computer is bad, it will result in a kernel panic,

      That may or may not happen depending on what your driver and the OS are trying to do with the hardware.

      Brandon T. H. wrote:

      how to make the software still do it's job, even though the hardware is bad or avoid a kernel panic or any other generic fatal error?

      Probably you need to trap all contingencies and make a decision what to do about them. For example, if your driver is writing to a disk and the system reports an error, you may need to make a note of where the error occurred and avoid that disk address in future. I am not sure how much of this information existing drivers will pass back to you, but most OSes give drivers the option to recover from hard errors. Again you would need to consult the driver documentation for the specific OS.

      One of these days I'm going to think of a really clever signature.

      B 1 Reply Last reply
      0
      • L Lost User

        Brandon T. H. wrote:

        how do you overwrite and delete a file using a driver?

        You would probably need to read the file tables from which you can get information about which sectors a specific file occupies. This information is proprietary to each file system type, NTFS etc: Google will find you lots of references.

        Brandon T. H. wrote:

        And how to tell what the operating system is?

        You will already know this as your driver will need to be customised to each OS.

        Brandon T. H. wrote:

        I've heard online, that if the hardware in the computer is bad, it will result in a kernel panic,

        That may or may not happen depending on what your driver and the OS are trying to do with the hardware.

        Brandon T. H. wrote:

        how to make the software still do it's job, even though the hardware is bad or avoid a kernel panic or any other generic fatal error?

        Probably you need to trap all contingencies and make a decision what to do about them. For example, if your driver is writing to a disk and the system reports an error, you may need to make a note of where the error occurred and avoid that disk address in future. I am not sure how much of this information existing drivers will pass back to you, but most OSes give drivers the option to recover from hard errors. Again you would need to consult the driver documentation for the specific OS.

        One of these days I'm going to think of a really clever signature.

        B Offline
        B Offline
        Brandon X12000
        wrote on last edited by
        #3

        Thanks for the advice, that really helped :thumbsup:

        Simple Thanks and Regards, Brandon T. H. Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

        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