c++ File Holder

I had posted this in the c++ forum but they told me to move it.

Hi, I'm a new member to this forum and I joined because I'm having some problems finding information about some pieces of code:

I was wondering how I could go about creating an protected folder-like object in c++, in order to put other files in it such as text documents and other exe's.

This is how it works in my head:

There's an exe that you open and that knows the pass word to the folder, and is the only thing that can open that folder and access the information inside that folder. The folder works like any other windows folder in the sense that everything in the folder can be removed/altered, the only difference being it can only be altered by the exe.

Can anyone provide me with a link or a book or any information that could help me create something like this?

Thank you.
Basically your talking about an encrypted volume then.
Not necessarily a volume, but a "container" with encrypted contents.

The one thing in Windows that comes to mind is Structured Storage: http://msdn.microsoft.com/en-us/library/aa380369(VS.85).aspx.

But Structured Storage doesn't provide facilities to encrypt. You will have to provide that elsewhere. Structured Storage provide you with a folder-like object accessed via the IStorage COM interface. Inside any given IStorage you can hold more IStorage objects or IStream objects. IStream would be the equivalent of files. Just encrypt the IStream contents and you'll have acquired your objective.

But to be honest, it is no simple stuff (not super hard stuff either, though). Good luck!
So you're trying to use this: http://www.7-zip.org/ but in C++?

Maybe a resource file?

Otherwise what are you planning on using this for? We may be able to offer a better solution.

Maybe if you can create a user account at install time for it to run as, then create the directory with permissions set so only the account can access. This is purely theoretical, I have no idea how to accomplish this, but it seems feasible to me and possibly easier then encryption.
Topic archived. No new replies allowed.