开发者

Read/Write operation on Fat table with out using System.IO in C#

Hi i am new to the system programming...i want to read information from fat table like total sector,total physical drive,containing logical drive types and as well containing files in the drives(like their file size,when accessed)with all information of files..and then display of these files with respect of their hierarchy at GUI.

this is easy if we use System.IO namespace.but it is restricted for me.so pleas开发者_开发百科e help


You'll have to DllImport the Kernel32.dll to do this.

internal extern static int ReadFile(SafeFileHandle handle, byte[] bytes,
int numBytesToRead, out int numBytesRead, IntPtr overlapped_MustBeZero);

ReadFile(handleValue, buf, size, out read, IntPtr.Zero);

As an example above of reading a file.

Head over to pinvoke for me details

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜