ylkjick532428 / dokan

Automatically exported from code.google.com/p/dokan
0 stars 0 forks source link

HOW TO implement methods: FlushFileBuffers, CloseFile, Cleanup (C#) #270

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I use c#.

I dont really know how to implements some functions. I checked the 
DokanNetMirror example already, but there most of the methods are not 
implemented, just return 0 or -1.

Methods i need:
CloseFile
Cleanup 
FlushFileBuffers
SetEndOfFile
SetAllocationSize
LockFile / UnlockFile
SetFileTime / SetFileAttributes

These should just return 0 and that's all ?

For example: 
        public int FlushFileBuffers(String filename, DokanFileInfo info)
        {
            return 0;
        }
???

Backgroud:
I need to make an encrypting program. The files are encrypted in a folder, that 
i mount to a virtual drive. Then i need to decrypt the files on-the-fly. 

Original issue reported on code.google.com by levi.ang...@gmail.com on 14 Nov 2012 at 4:54

GoogleCodeExporter commented 8 years ago
https://github.com/apaka/dokan-net/blob/master/Mirror.cs
http://code.google.com/p/dokan/source/browse/trunk/dokan_mirror/mirror.c
Also msdn has documentation of some functions like
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724933%28v=vs.85%29.as
px

Original comment by mladenov...@gmail.com on 14 Nov 2012 at 5:56

GoogleCodeExporter commented 8 years ago
Hi,

thanks for your answer. By the way, I compiled your Sample code on GitHub and 
still with your solution i get the same problem with deleting a file on the 
virtual drive. That is, that deleting a file on the virtual drive doesnt delete 
the file in the folder that i mounted. (windows8)

Original comment by levi.ang...@gmail.com on 16 Nov 2012 at 12:17