Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Sandboxie is a program that will let you read from the hard drive, but when you try to write back it will redirect the file to a separate container. I would like to learn how to do something similar. I do not know what terms or libraries to look for. Is there a file redirection API in windows? Is there a open source library that can help me out with the down and dirty pieces?

I know there is likely no API in windows to do this out of the box and I will likely need to write my own driver. I don't mind writing a driver, this project is to be a learning experience for me and I kind of want to learn how to do it.

Any help would be greatly appreciated.


Clarification:

I am trying to replicate the behavior of sandboxie, IE: launching a unmodified exe of another program and redirecting the way it handles file IO.

What I want to do is basically have a launcher that will turn my SSD disk in to a cache for my spinning drive. I launch my app and it in turn launches another app. Any resources the other app requests will be passed through to the spinning disk, but also copied to the SSD. Any further reads and all writes will be done to the SSD copy of the file. Once the other program closes, my app will flush the writes from the SSD back to the spinning disk.

I could technically do this through sandboxie and some scripting tricks but I want to learn the internals of file IO and how to do the redirection.


Clarification 2:

I no-longer have a issue using a prebuilt library, as long as it is free (as in beer). It does not need to be open source or free (as in speech) .

share|improve this question
    
Community wiki is an appropriate choice when the post can benefit from collaborative editing. Questions that might invite answers from different perspectives do not need to be wikified. See The Future of Community Wiki blog post for additional info. –  Anna Lear Sep 9 '11 at 20:47
    
Email the creators of Sandboxie. Or ask on their forum if they have one. –  Nav Nov 9 '11 at 3:55
    
you can do this with a $39 SATA card from HighPoint RocketHybrid –  Jarrod Roberson Dec 8 '11 at 22:06
    
I think what you are looking for is called ZFS. –  Wyatt Barnett Jan 8 '12 at 0:58
    
@WyattBarnett I could not find a ZFS port for windows, would you mind sharing a link to the project? –  Scott Chamberlain Jan 8 '12 at 1:05
show 2 more comments

1 Answer

up vote 1 down vote accepted

Have you tried contacting Ronen Tzur via his forums for more information about his software?

Ronen Tzur provides some details about Sandboxie's design in Security Now Episode 172 Sandboxie.

Steve Gibson discuses the limitations of sandboxing in Security Now Episode 174 Virtual Security.

You can also read the show notes for episodes 172 & 174 here.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.