Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 907
  • Last Modified:

Using Volume Shadow Copy with C++

We're looking to implement VSS into our C++ project, but cannot find any solid information on what functions/headers need to be used. Here's our goal:

1. Check if file is locked/in use.
-CreateFile(hFile,"c:\\windows\\system32\\config\\system", GENERIC_READ,....);
2. If it is locked, generate a volume shadow copy of the file/drive
-SomeVSSFunction();
3. Grab the path to the file
-szFilePath = AnotherVSSFunction();
4. Send the path to the zip function
-zipfile(szFilePath, szDest);

The problem is that I don't know what functions to use to complete my requirements. I have the VSS 7.2 SDK and I looked at the examples. The only applicable one is 'vshadow' but it appears overly complex for my needs. Any ideas or existing code I can take a look at?
0
zystemsgo
Asked:
zystemsgo
  • 2
  • 2
1 Solution
 
TCB1Commented:
Sorry, I just read that you already downloaded the api. Maybe the reference will help?

I know of a program that's freeware that may do what you need. It's called--simply enough--"Shadow Copy". It probably will not help you with your coding project since you don't have the source code.

http://www.runtime.org/shadow-copy.htm
0
 
zystemsgoAuthor Commented:
I have used Shadow Copy as a work around for now, but it just copies the file from one place to another. I'd rather be able to access the shadow volume directly in code and not have to worry about copying/deleting data. Essentially, I'm looking for a C++ wrapper that encapsulates the VSS stuff in a nice class. Thus far I cannot find anything of the sort.
0
 
zystemsgoAuthor Commented:
Closing the question due to inactivity. Awarding points for attempting to help.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now