I am creating a VSS snapshot in a program using C++ and the VSS API. According to here you can use the FindFirstFile/FindNextFile functions or create a symbolic link to the volume and go through the link to access the files in a VSS snapshot. Are there any other ways? Thanks.
Asked
Active
Viewed 385 times
-1
-
Does the documentation mention other ways? This is off-topic, it's asking for general advice and there's no code for context. – tadman Jul 17 '18 at 19:59
-
Have you tried searching for open source projects that make use of VSS? – dgnuff Jul 17 '18 at 20:06
-
Thanks guys. Tadman I was hoping to create a record of all possible options for enumerating through a VSS snapshot - do you consider that general advice? No code necessary since this is not a coding question. It seems appropriate to me... Dgnuff I've pretty thoroughly googled it just wanted to get input from an expert. – riverofwind Jul 18 '18 at 00:22
1 Answers
0
As the link itself says, FindFirstFile
is just an example of how Win32 functions can access the VSS snapshot. You're incorrectly assuming it's somehow special. As the VSS snapshots are just filesystems, it would be exceptional for a file function to not work on them. Chances are high that even std::ifstream
would work.

MSalters
- 173,980
- 10
- 155
- 350
-
It does say they can't be viewed in explorer. And when I try to access \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy35\ for VSS on my computer it fails. If it's not transparent to the OS how are you supposed to access the snapshot? – riverofwind Jul 18 '18 at 19:38
-
@JoshOrenberg: Explorer would be shell-level; `FindFirstFile` is Win32 API level. Explorer isn't so much part of the OS as another program (it's explorer.EXE, after all). – MSalters Jul 18 '18 at 19:58
-
I just tested with QDir set to the \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy##\ path and QDir.entryList() returned nothing so scratch that possibility. (using Qt framework) – riverofwind Jul 20 '18 at 19:26