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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top