views:

186

answers:

3
+1  Q: 

UNC Virtual Folder

I would like to expose some service functionality as a virtual file share to allow conventional applications to use the virtual folder as a real one.

For example, a file path consisting of

\\\\Server\VirtualShare\File.ext

means that VirtualShare doesn't really exist and only available as long as my service is running. A file access with the virtual share must implicitly use my service.

My question is, whether some API (of samples) exist to expose own virtual file shares. What's about WCF?

+1  A: 

You would need to write a file system driver to do this. It is fascinating but horrendously difficult and can only be done in C (not even C++). If you are interested check out the Windows Driver Kit.

EDIT: You can check out some user mode file system stuff like Dokan which is interesting but I wouldn't use it in production or Callback a commercial one that I have heard little about so I can't recommend it one way or the other.

Stephen Martin
A: 

If you only need it available from the local machine, checkout Dokan for writing userland filesystems. .Net wrapper is available as well.

Joel Lucsy
A: 

I'll refer you to this, similar question:

http://stackoverflow.com/questions/24408/database-query-representation-impersonating-file-on-windows-share

Where I suggested WinFUSE or SAMBA on Linux and FUSE.

Mark Brackett