tags:

views:

28

answers:

1

How hard is it to create a virtual file of sorts on Windows that can add functionality to read/write calls?

For instance, ideally I'd want to create a file then attach an event handler so whenever the file is read, the read call blocks and code is ran to fetch data, that data is populated into the file, then the data is sent to the program requesting the read.

From what I understand this is close to how FUSE works, but there doesn't seem to be a FUSE implementation in Windows. Capturing the open/read/write is really all I need if there is a way to do that.

A: 

This is generally not possible, and writing a user-mode filesystem like FUSE would be extremely difficult.

Most people do this via simulating a SMB or WebDAV server then connecting it, as well as some Shell extensions to make the user experience better, but this is also not a trivial affair.

What's your scenario? Maybe there's a better way to do what you're attempting to do...

Paul Betts
Basically I have a USB hardware device I can talk to that has various small pieces of data (floats) that can be read/written. I have code/a .dll to talk to the device but being able to just read/write to a file like it's a hard mapped register to the device would let me use it in more environments than I currently can (such as in programs that can read/write files).
Phaz