4

I need to implement a Windows Virtual Disk that is visible as a separate disk device in Windows Explorer and transfer all files/dir transferred forth and back to a remote WebService - sth like a DropBox. Do I have to implement/use a kernel driver SDK? Or is it possoible to use only shell extensions? What I need is to intercept all file/dir operations on that disk and map them to a corresponding WebService calls (file creation/deletion/move/edit and data transfer). Thanks

cubesoft
  • 3,448
  • 7
  • 49
  • 91
  • An answer should be burried in TrueCrypt resp. VeraCrypt's [C source code](https://veracrypt.codeplex.com/wikipage?title=Downloads), since this tool provides virtual disks (based on encrypted containers). And seems not to heavily depend on other APIs. Of course you need to [bridge the gap from C# to C](http://stackoverflow.com/a/11425288/444255) – Frank N Dec 09 '15 at 16:28
  • Also: look at [imdisk](http://www.ltr-data.se/opencode.html/#ImDisk) and [its source code](http://www.ltr-data.se/files/imdisk_source.7z). Uses [Windows Driver Kit](http://www.microsoft.com/en-us/download/details.aspx?id=11800)... – Frank N Dec 09 '15 at 16:55

4 Answers4

6

You will need a combination of kernel-mode driver and Windows Service/Application for that:

Yahia
  • 69,653
  • 9
  • 115
  • 144
  • Stuff from Eterlogic is not applicable here. They copied our CallbackDisk product (up to text on the site), which is different from what @dominolog wants. Codeproject stuff also creates a virtual disk but not a virtual filesystem (which is needed to mimic Dropbox). – Eugene Mayevski 'Callback Nov 17 '11 at 17:24
  • @EugeneMayevski'EldoSCorp good to know... I already wondered when I saw eterlogic... – Yahia Nov 17 '11 at 17:26
  • 1
    I don't think DropBox is this at all. The DropBox root directory is mapped to a designated physical directory, and a background service synchronizes it with the server. Add to that a bunch of shell extensions (icon overlay, context menu) and you're all set. I don't think there's even a namespace extension either. – Simon Mourier Sep 12 '13 at 06:36
1

Windows 7+ allows you to mount a VHD as a disk. The API is described in this MSDN article -The Virtual Disk API In Windows 7.

I don't know if it's possible with just shell extensions, but scanning the article I see the API AttachVirtualDisk, and you should be able to P/Invoke that.

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
0

Have you considered WebDAV? This wouldn't require you to install anything on the client, since the functionality is integrated into Windows (I believe since XP). It is using REST, so you could even implement it yourself or look for a solution on codeplex. If it is just about remote storage, there is an IIS addon you can use for that (I believe it is build for IIS 7).

J. Tihon
  • 4,439
  • 24
  • 19
0

You can go with namespace extensions, this is what DropBox does. Wuala and some other cloud storage provides, on the other hand, use our Callback File System to create a virtual disk.

Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121