Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

Getting error when trying to use CreateFile

Why can't I use createFile with flags = FILE_FLAG_DELETE_ON_CLOSE, it always returns error. I do not have admin privilages, just basic user on Win2K.  Is this a flag that can't be used when you are logged onto a system as a normal user and not admin?

I am assuming this is normal behavior because under admin privs it works fine. Can someone point me to a link where I can get some info on this?

Thanks.
0
GAZZA
Asked:
GAZZA
1 Solution
 
jkrCommented:
Try using 'FILE_SHARE_DELETE' as the 'dwShareMode' argument to 'CreateFile()'...
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now