Virtual File

How can I use C++ to write a "virtual" file that isn't shown on the file system? What I'm trying to do is make a DLL that can create a file and allow the application to load files right from the DLL without the DLL exposing the file (it can't be written to the filesystem). I don't have control over the application that is being used, so I need to create a virtual file that can be accessed like a normal file but the actual data is stored in memory.


So how can I have a dll create a file, and let another program access the file (Like a normal file) without actually writing it to the windows file system (where it's shown in Explorer).


I know this is a tough question but please point me in the right direction.

Thanks a lot!
Well, you could use a stringstream to store the stuff. It basically works like an fstream.
Topic archived. No new replies allowed.