Working the disk sectors directly from C#

  • Thread starter Thread starter glennanthonyb
  • Start date Start date
G

glennanthonyb

Hi

Is there a way of working with sectors directly in C#. Any pointers, C# or
not, would be appreciated.

This is related to a previous post on file shredding in C#.

Thanks

Glenn
 
Is there a way of working with sectors directly in C#. Any pointers, C# or
not, would be appreciated.

This is related to a previous post on file shredding in C#.

My gut feeling is that you'd have to identify the native APIs you want
to use, then wrap them using P/Invoke.

Jon
 
Hi

Is there a way of working with sectors directly in C#.  Any pointers, C#or
not, would be appreciated.

This is related to a previous post on file shredding in C#.

Thanks

Glenn

Hi,

NO.

You have to P/invoke . not only that but I don't know if there is any
API function that you can use for that.

You need to ask in unmanaged NG and apply the same from .NET
 
Hi

Is there a way of working with sectors directly in C#.  Any pointers, C#or
not, would be appreciated.

This is related to a previous post on file shredding in C#.

Thanks

Glenn

of course, you can always call int 21 :)
 
you can open the disc in native/raw format just as if it was a normal file,
ofc this is risky if it has an atatched file system
its so long since I did it that ive forgoton the the filenames,
you have to use.

when I did it discs were <1gb i later tried my prgram on a 4gb drive and
realised I needed 64 bit version or drasticaly change it lol.
duno if this helps

ofc i dont know if your stil 'allowed' to do this especialy with vista.

there is also an internal sector relocation used by defraggers,
infact u can relocate 2 sectors from the dos cmd line if you realy wanted
to.

id love to move all the most used sectors and those used at boot time to
be in an optimal place, norton tools used to have this facility,
but they seemed to have droped that feature,
i havnt given them any buisiness since then.

Colin =^.^=
 
If it was going to be simple, I'd give it a try, as it doesn't appear to be
straightforward, I'll stick with the original, much simpler, method.

Thanks for the advice

Glenn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top