Prevent access to a file (vc++, vc#)

  • Thread starter Thread starter SoxFan44
  • Start date Start date
S

SoxFan44

Hi,
I was wondering if there way any way that I could write a program that would
run in the background and prevent access to a specific file. I can't use
Windows permissions. Thanks for any advice!
 
SoxFan44 said:
Hi,
I was wondering if there way any way that I could write a program that would
run in the background and prevent access to a specific file. I can't use
Windows permissions. Thanks for any advice!

You could, conceivably, open the file with CreateFile and specify 0 for
the dwShareMode parameter which would not allow anyone to read or write
the file.

Adam Ruth
 
Back
Top