Dokan

user mode file system for windows    >>Japanese version

Dokan.NET 0.1.6 released

January 31st, 2008 in .NET, Dokan

Dokan.NET 0.1.6 is released.

Dokan.NET is a .NET library to write a file system in user-mode. You can write Windows file system in C#.

Changes from 0.1.5
- Fixed release build of Dokan.NET
- Added ProcessId to DokanFileInfo class

9 Responses to “Dokan.NET 0.1.6 released”

  • Sebastian
    March 9th, 2008 at 10:29 pm

    Hey guys,

    I’m having some trouble with the sample application “DokanNetMirro”. Compiling and running it works fine, but once I quit the program, my explorer freezes and I have to restart my computer. Doesn’t the sample application unmount its drive automatically? I tried putting “DokanNet.DokanUnmount(’n');” as the last line in the main method, but that didn’t solve the problem. What am I missing here?

    Regards,

    Sebastian

  • Hiroki
    March 9th, 2008 at 10:59 pm

    Hi

    To unmount, you should run “dokanctl.exe /u n”.
    dokanctl.exe is in Program Files\Dokan\DokanLibrary.

    Did you quit your program with Control-C?
    If so, “DokanNet.DokanUnmount(’n’)” line is not executed.

    Thanks

  • Sebastian
    March 9th, 2008 at 11:20 pm

    Hey Hiroki,

    thanks for your prompt answer! running “dokanctl.exe /u n” works indeed. But I’d rather unmount the drive from the program.

    I quit the sample application by clicking on the “close window” button of the console window. The output in VS says:

    “The program ‘[5172] DokanNetMirror.vshost.exe: Managed’ has exited with code 0 (0×0).”

    So the “DokanNet.DokanUnmount(’n’)” should have been called, right?

  • Hiroki
    March 10th, 2008 at 12:02 am

    Hello

    I think “DokanNet.DokanUnmount(’n’)” is not called.
    If you want to capture console closed event,
    you try bellow codes.
    http://geekswithblogs.net/mrnat/archive/2004/09/23/11594.aspx
    If you want to capture Ctrl-C, you can use Console.CancelKeyPress.

    Thanks.

  • Sebastian
    March 11th, 2008 at 3:53 am

    Hey Hiroki,

    thanks again for the hints! It all worked out perfectly! Right now I have another question, though.
    I’m trying to build a filesystem that represents files stored on an external webservice (photos/videos). The filesystem tree will only have two levels. The top level will only contain folders (sets), which (in the second level) contain the pictures and videos. Right now I build my directory and file structure in the FindFiles() function. My question is, whether I can add any additional information (like an ID) to the files I fill the (ArrayList files) with, that will be available in the other functions as well? Right now, I have to parse the filename in each and every function to see where I am in my filesystem tree…:-(

    Regards,

    Sebastian

  • HarryH
    April 9th, 2008 at 12:26 pm

    First off, many thanks for this drive that works in .net .. I been looking for something like this for some time.

    <>, (Hiroki - please correct me if I’m wrong here..)

    From what I can tell you can easily add additional attributes to your file tag.

    I would suggest that you create a derived class from FileInformation
    and in function FindFiles where it updates the arraylist of values to pass back “files.Add(finfo);” you switch it to insert your own derived class here… remember that you must always cast derived class of FileInfomation when you need the extra bytes of information your have stored. I would suggest using primitives like integer whenever possible as this will not cause to much memory overhead in passing the array back and forth between the callee.

  • Hiroki
    April 9th, 2008 at 11:44 pm

    Thanks HarryH, I directory mailed Sebastian about his issue before.
    I should have shared it here.

    HarryH, unfortunately your idea don’t fit this situation.
    In order to keep additional attributes to a specific file,
    you have to store your file attributes in a hashmap-like object
    like Dictionary<Filename, YourInfo>.

    Thanks again.

  • HarryH
    April 12th, 2008 at 1:07 am

    Yes Hiroki, you’re correct.

    Question -

    do you have any samples in c# of a file caching read/write class, I need to have a thread reading bytes from the real source file and writing it to a temp location while another thread reads from the temp file and buffers back the bytes to the calling client on occasion pausing while file the cache is being written to.

    As a novice I’m having real trouble building this, hoping perhaps you have some sample you wouldn’t mind sharing with me.

    Thanks Again.

  • Hiroki
    April 13th, 2008 at 11:26 am

    Hello, HarryH

    I don’t use reading/writing cache on my program, so I can’t send you a sample code.
    By the way, your problem is so called “Producer-consumer problem”?
    You can check some concurrent programming textbook.
    http://en.wikipedia.org/wiki/Producer-consumer_problem

    Thanks

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image