[Dokan] Double-clicking an item in windows explorer, how-to handle?

72 views
Skip to first unread message

Lucas

unread,
Apr 26, 2010, 11:14:28 PM4/26/10
to Dokan
Question:
When I double-click an item within explorer that exists in my Dokan
based file system, what callbacks do I need to implement to handle
this?

Explanation:
My file-system is a front-end to a DMS system. I need to support many
file-types supported by the windows system. From what I can tell,
when I double-click the item, it calls OpenDirectory and Cleanup.
Does OpenDirectory need to return something specific, does it need to
modify the DokanFileInfo? I would expect ReadFile to be called, but
from what I can tell it is not called, I know I am handling something
incorrectly, but I am unaware of what.

Any ideas?

Thanks,

- LN

--
You received this message because you are subscribed to the Google Groups "Dokan" group.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.

Joe Burmeister

unread,
Apr 27, 2010, 5:09:50 AM4/27/10
to do...@googlegroups.com
Hi,

For a directory the standard call sequence is:

OpenDirectory
FindFiles (or FindFilesWithPattern if that's what you are using)
Cleanup
CloseFile (You can get by without this, it's all to do with how
Windows filesystem cache works, it's a topic in itself.)

OpenDirectory doesn't need to modify the DokanFileInfo. It has two
purposes really, is that path a valid folder, and open it if you file
system needs it opened for any operations. In my filesystems, I only
resolve the path in OpenDirectory and CreateFile, where I stick a
pointer in the DokanFileInfo userdata and use that until it's closed.

I would say the minimal callbacks to implement for a working
filesystem are OpenDirectory, CreateFile, FindFiles,
GetFileInformation and ReadFile. But you will probably need some file
closure, so you will probably also want Cleanup.

Did you go through the Dokan example? It is worth doing and it won't take long.

Hope this helps some. :-)

Joe
Reply all
Reply to author
Forward
0 new messages