Solved

Getting  error when trying to use CreateFile

Posted on 2002-03-27
3
256 Views
Last Modified: 2013-12-03
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
Comment
Question by:GAZZA
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 6899739
Try using 'FILE_SHARE_DELETE' as the 'dwShareMode' argument to 'CreateFile()'...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now