locked
Read/Write without a FAT RRS feed

  • Question

  • I am trying to do read/write operations on an flash card without a FAT using C#.  Any suggestions on how to do this?
    In particular, I would like to read/write on a sector-by-sector basis...

    Tuesday, April 7, 2009 8:31 PM

Answers

  • C# is not good for low level disk access. If you use it you'll just be using a lot of P/Invoke to bring in functions C# doesn't have. I would suggest C/C++. I don't know how to actually do it in either language, but just so ya know C# ain't made for it.
    • Marked as answer by WillP Wednesday, April 8, 2009 2:11 PM
    Tuesday, April 7, 2009 9:07 PM
  • C# works on File system. You need to go down.
    You better use Low level C or C++.


    --------------------
    • Proposed as answer by Raheem Abdur Wednesday, April 8, 2009 1:24 PM
    • Marked as answer by WillP Wednesday, April 8, 2009 2:11 PM
    Wednesday, April 8, 2009 1:24 PM
  • Hi,
    C# is not recommended for Low Level Access, you can use un-managed code for that purpose or call native code from C# or some kind of wrapper :)
    Adil Mughal - MCP http://adilamughal.blogspot.com
    • Marked as answer by WillP Wednesday, April 8, 2009 2:11 PM
    Wednesday, April 8, 2009 1:34 PM

All replies

  • C# is not good for low level disk access. If you use it you'll just be using a lot of P/Invoke to bring in functions C# doesn't have. I would suggest C/C++. I don't know how to actually do it in either language, but just so ya know C# ain't made for it.
    • Marked as answer by WillP Wednesday, April 8, 2009 2:11 PM
    Tuesday, April 7, 2009 9:07 PM
  • C# works on File system. You need to go down.
    You better use Low level C or C++.


    --------------------
    • Proposed as answer by Raheem Abdur Wednesday, April 8, 2009 1:24 PM
    • Marked as answer by WillP Wednesday, April 8, 2009 2:11 PM
    Wednesday, April 8, 2009 1:24 PM
  • Hi,
    C# is not recommended for Low Level Access, you can use un-managed code for that purpose or call native code from C# or some kind of wrapper :)
    Adil Mughal - MCP http://adilamughal.blogspot.com
    • Marked as answer by WillP Wednesday, April 8, 2009 2:11 PM
    Wednesday, April 8, 2009 1:34 PM
  • thanks.  I'll look into doing it in C and calling the C program from c#
    Wednesday, April 8, 2009 2:10 PM