Re: FILE_FLAG_DELETE_ON_CLOSE
- From: "Erwin Zwart" <ErwinDOTZwartATptsDOTNL>
- Date: Fri, 14 Jul 2006 07:46:00 +0200
please look at the CreateFile() fucntion in the MSDN library (or local
help), where it is saying that this flag is nof supported.:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcedata5/html/wce50lrfcreatefile.asp
So this is expected behaviour. Closing the handle should be enough, delete
the file with DeleteFile API,
Erwin Zwart
"John Belli" <jab@xxxxxxxxxxxxx> wrote in message
news:6p5db2pagshr3d7b92o38t891leevk0s8h@xxxxxxxxxx
Is this meant to be unsupported on CE? If I CreateFile(...) with
this flag and immediately CloseHandle(...), the file isn't
deleted, so I'm sure I'm not leaving some other handle open.
I'm using VS2k5 and an HP iPAQ hx2495 (WM5); This is a
dynamically-linkd MFC Dialog app. I have tried compiling as both
PPC2k3 and WM5.
The following 2 lines result in the file named in "tmpName"
existing permanently:
HANDLE tmpFile =
CreateFile(tmpName, GENERIC_READ | GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY |
FILE_FLAG_DELETE_ON_CLOSE, NULL);
CloseHandle(tmpFile);
Is this intended, or do I have something seriously wrong?
JAB
.
- Follow-Ups:
- Re: FILE_FLAG_DELETE_ON_CLOSE
- From: John Belli
- Re: FILE_FLAG_DELETE_ON_CLOSE
- References:
- FILE_FLAG_DELETE_ON_CLOSE
- From: John Belli
- FILE_FLAG_DELETE_ON_CLOSE
- Prev by Date: FILE_FLAG_DELETE_ON_CLOSE
- Next by Date: FTP Throughput on WINCE using the WININET
- Previous by thread: FILE_FLAG_DELETE_ON_CLOSE
- Next by thread: Re: FILE_FLAG_DELETE_ON_CLOSE
- Index(es):
Relevant Pages
|