Dokan

user mode file system for windows    >>Japanese version

Dokan library 0.4.0 released

December 11th, 2008 in Dokan

Dokan library 0.4.0 has just been released!
I’m pleased to announce the launch of new version of Dokan library. I completely redesigned the driver event handling model. There are a lot of improvements from the previous version. You must recompile all programs which use Dokan library because dokan.h is changed and this version is not compatible with the previous one. You need to update Dokan.NET, Dokan Ruby and Dokan SSHFS.

The license of Dokan driver is changed to LGPL from GPL.
- driver (dokan.sys) : LGPL
- dll (dokan.dll) : LGPL
- mounter, dokanctl, mirror sample : MIT

Dokan API is changed.
The difference of dokan.h is here
I changed to pass DOKAN_OPTIONS (which is passed to DokanMain) in DOKAN_FILE_INFO structure
and I put GlobalContext in DOKAN_OPTIONS structure. I add “DeleteOnClose” in DOKAN_FILE_INFO structure and changed the usage of Cleanup, DeleteFile and DeleteDirectory.

You should not delete file on DeleteFile or DeleteDirectory. When DeleteFile or DeleteDirectory, you must check whether you can delete or not, and return 0 (when you can delete it) or appropriate error codes such as -ERROR_DIR_NOT_EMPTY, -ERROR_SHARING_VIOLATION. When you return 0 (ERROR_SUCCESS), you get Cleanup with FileInfo->DeleteOnClose set TRUE, then you delete the file.

Changes from 0.3.9.
- Fixed: error during multiple file deletion. issue
- Fixed: excel support issue
- Fixed: file deletion in Explorer issue
- Fixed: improper CloseHandle issue
- Supported: filesytem wide context issue
- Fixed: 0 byte read issue
- Fixed: saving new file in notepad issue

x64 version coming soon.

17 Responses to “Dokan library 0.4.0 released”

  • John
    December 11th, 2008 at 11:20 am

    Thanks to all for fixing this great library. I can now create, read, and write to files with only 22 lines of code added to DokaNetMirror. I never thought writing a VFS could be so simple.

  • John
    December 11th, 2008 at 12:56 pm

    I think I’ve found as error in the way “FileAccess access” in the CreateFile function in the dokan-net library. GENERIC_READ should be 0×8 not 0×80000000 and GENERIC_WRITE should be 0×4 not 0×40000000. Don’t ya just hate that little/big endian mess.

  • Felix
    December 13th, 2008 at 2:08 am

    Great work :-) Suggestion: how about starting a Google Group or some other mailing list for your community of fellow developers and users?

  • Peter
    December 15th, 2008 at 6:59 pm

    Hi!

    Good Work! I tried the new Dokan Version works fine! But I think in Dokan.net Deleteonclose is missing in Fileinfo.

    Peter

  • MC
    December 15th, 2008 at 9:22 pm

    Hello,

    I test the delivered sample and I cannot create a directory name if it is longer than 8 characters and it is truncated to 8 characters for a filename…Is it possible to remove this check? If yes, how?

    Thanks for your help…

  • Peter
    December 16th, 2008 at 11:08 pm

    Hi!

    I have 2 Issues with the new Dokan Version.
    I still can’t edit Microsoft Excel docx files on Dokan mirrorfs.
    and when my app chrashes the filesystem isn’t unmounted. Is there a way to tell dokan to unmount by itself it a requests to the app timoeout?

    @MC
    I don’t think thats Dokan doesn’t support long dirnames, because when using Dokan.net I can create really long dir names. Perhaps there is a bug in the sample.

    Peter

  • xmojmr
    December 19th, 2008 at 9:38 pm

    I’ll give it another try (there was the memory leaking).
    Thanks for nice Christmas present :)

  • JimR
    December 24th, 2008 at 10:42 am

    Re “You should not delete file on DeleteFile or DeleteDirectory. When DeleteFile or DeleteDirectory, you must check whether you can delete or not, and return 0 (when you can delete it) or appropriate error codes such as -ERROR_DIR_NOT_EMPTY, -ERROR_SHARING_VIOLATION. When you return 0 (ERROR_SUCCESS), you get Cleanup with FileInfo->DeleteOnClose set TRUE, then you delete the file.”

    This means the check + delete non-atomic, so another user thread could come in and do something to the file or dir in the middle that will then cause an error on the delete. How can we best solve this?

  • Hiroki
    December 24th, 2008 at 10:24 pm

    Hi, JimR
    > This means the check + delete non-atomic, so another user thread
    > could come in and do something to the file or dir in the middle
    > that will then cause an error on the delete.
    Yes, though I think that is a rare case.
    > How can we best solve this?
    Filesystem should handle that. I think it is not easy to do, you need to store information per file, and every filesystem should handle that situation. In the next version, I’ll set DeleteOnClose in the next version when the same file is accessed, so that you can check whether that is deleted or not.

  • Dokan » Blog Archive » Dokan library 0.4.1 released
    December 29th, 2008 at 11:55 pm

    [...] Changes since 0.4.0 – Fixed error while creating new file with Word 2003. issue – Fixed dokan.dll crash when it is restarted after unexpected termination. – Set DeleteOnClose flag in CreateFile when the file is already marked as deleted. JimR reported [...]

  • Md. Rashim Uddin
    December 28th, 2009 at 12:36 pm

    How to implement read write functionality using Dokan Library. Any Help

  • yankee candles cheap
    March 1st, 2011 at 12:09 am

    Wholesale Yankee Candles…

    [...]just below, are some totally unrelated sites to ours, however, they are definitely worth checking out[...]…

  • Cheap Yankee CAndls
    March 1st, 2011 at 4:34 pm

    Buy Yankee Candles at Half Off…

    [...]the time to read or visit the content or sites we have linked to below the[...]…

  • job openings in georgia
    March 8th, 2011 at 9:41 am

    Big Job Site…

    [...]while the sites we link to below are completely unrelated to ours, we think they are worth a read, so have a look[...]…

  • 3d ultrasounds
    May 11th, 2011 at 8:43 pm

    I really appreciate the kind of topics you post here. Thanks for sharing information that is actually helpful. Good day!

  • Reversal of Tubal Ligation
    May 18th, 2011 at 8:18 pm

    Awesome and interesting information and attractive post.
    Yes, the blog is very interesting and I really like.

  • Oakley Sunglasses
    July 14th, 2011 at 6:48 pm

    Cheap Oakleys are of great importance to protect the eyes from harmful sun rays and prevent the dirt from entering the eyes. Apart from this, there are other reasons as well behind the immense popularity of sunglasses. Of all brands available, Rayban Sunglasses have acquired an important place in both men’s and women’s fashion world. A good pair of sunglasses that perfectly fits the facial shape can accentuate the looks of a person to a great extent.