Unmount

206 views
Skip to first unread message

Kirk

unread,
Dec 8, 2009, 5:20:18 PM12/8/09
to Dokan
I'd like to mount a virtual file system via DokanMain( ) from a
command-line program and make it possible for the user to unmount the
drive at will through a standard Windows GUI operation, e.g. the
MyComputer window context menu's "Eject" item as seen in the CD
drive's context menu. I see that one of the DOKAN_OPERATIONS is an
Unmount( ) callback which suggests that this is possible. Is there a
DOKAN_OPTION or a DokanMain( ) argv switch that I can use for this?

Kirk

unread,
Dec 8, 2009, 5:53:46 PM12/8/09
to Dokan
Whatt triggers the DOKAN_OPERATIONS.Unmount( ) callback?
Running "dokanctl.exe /u ..." from the command line doesn't result in
a call to it.

Slavko

unread,
Dec 8, 2009, 7:46:50 PM12/8/09
to Dokan
To unmount drive programmatically call DokanUnmount method exported
from Dokan.dll
In your case I'd suggest writign Windows Shell context menu extension
which will call that method. Or you can write .EXE which will be
invoked from context menu and will just call that method. In this case
you don't need to mess with shell interfaces and registrations.

Cheers,
Slavko.

Peter Siegel

unread,
Dec 9, 2009, 7:01:07 AM12/9/09
to do...@googlegroups.com
Hi!

I have tested the svn R47 in vista x86 .net extensively and i found a bug.
Sometimes it reports a Index out of range exception, which happens
because the key has been deleted.
You can find the patch attached to this message. This patch also adds
functionality to change the FS description from e.g.: dokan to something
of you choice...

I hope this is the correct way of commiting patches to dokan...

Perhaps someone can test the patch with other architectures or systems.

Peter
Bugfix&feature.patch

Peter Siegel

unread,
Dec 9, 2009, 7:09:40 AM12/9/09
to do...@googlegroups.com
Hi!

Do you know what SetAllocationSize is supposed to do?

Dokannet:

public abstract int SetAllocationSize(
string filename,
long length,
DokanFileInfo info);

I can find documentation of all the other callback functions in MSDN
WIN32 but I can't find SetAllocationSize.

Peter
Reply all
Reply to author
Forward
0 new messages