DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Read locked file  (Read 3,707 times)

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Read locked file
« on: June 26, 2010, 11:07 PM »
Hey codies, I need your help.

I need to copy a file that's constantly "locked" by the application that's using it, WHILE it's using it. I tried patching the app to pass ShareMode = FILE_SHARE_READ|FILE_SHARE_WRITE on every call to CreateFile, but it doesn't work.

Any ideas that do NOT involve VSS?

Help would be greatly appreciated.


Update: the patch worked, *I* wasn't closing the fucking file when I had to. I deserve to be shot.
« Last Edit: June 26, 2010, 11:17 PM by scancode »

Original address: https://www.donationcoder.com/forum/index.php?topic=23235.0