1

Does anyone have sample code to copy open (in-use and locked by another program) files using Volume Shadow Copy Service (VSS) API?

There was an article about this in The Delphi Magazine (September 2005). But that code is no longer available and even if it was, it's not current.

I am looking for sample code that works with current version of Volume Shadow Copy service libraries.

TheDude
  • 3,045
  • 4
  • 46
  • 95
Vic
  • 935
  • 2
  • 14
  • 21
  • Why would Volume Shadow Copy Service be abbreviated as VSS instead of VSCS? VSS is commonly used as an abbreviation for (Visual) SourceSafe. – Ryan Lundy Nov 12 '08 at 14:29
  • I know it sounds strange, but Microsoft abbreviates it as VSS. See: http://msdn.microsoft.com/en-us/library/bb968832(VS.85).aspx – Vic Nov 12 '08 at 16:13
  • I have both, the article and the code. Can this be of any help for you? – Uwe Raabe Nov 12 '08 at 18:54
  • 1
    Sure, it would be a good starting point. I will have to update it to the current versions of the library. – Vic Nov 13 '08 at 16:49
  • did you found my answer? you may accept it. then this message isnt display anymore under open questions – coding Bott Feb 25 '09 at 23:30
  • Uwe Raabe sent me the code from the original article. I still have not found code that works with the "current version" of VSS libraries. But I will accept Bernd Ott's answer. – Vic Mar 04 '09 at 12:59

2 Answers2

1

there is a digital edition on usb stick of the "The Delphi Magazine". you can order that on their webpage.

maybe someone has created a torrent of that stick.

update

i found that sample here: http://www.google.com/codesearch/p?hl=de#XIdFp1PskBE/VSS/VssAPI.pas

Upper link is outdated, the header-files can also found here: http://www.delphipraxis.net/998560-post3.html

coding Bott
  • 4,287
  • 1
  • 27
  • 44
0

I found a working (XE2) example here: http://www.rathlev-home.de/sources/delphi.html#progsxe2

For compilation with XE8 get the latest "gnugettext.pas"

This package contains all units necessary for compiling a delphi program which creates a volume shadow copy. In addition there is a example application VsToolkit available. I compiled it with XE2 and XE8 and it works just fine...

Manfred
  • 1
  • 2
  • Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Rohit Gupta Aug 23 '15 at 10:57
  • Can you add the most important thing of the link into your question? Some users never looks to links. – H. Pauwelyn Aug 23 '15 at 11:04