Click here to Skip to main content
15,891,607 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I was sent this, and... Pin
Mark_Wallace8-Feb-19 9:00
Mark_Wallace8-Feb-19 9:00 
GeneralRe: I was sent this, and... Pin
jeron18-Feb-19 9:13
jeron18-Feb-19 9:13 
GeneralRe: I was sent this, and... Pin
RickZeeland8-Feb-19 8:00
mveRickZeeland8-Feb-19 8:00 
GeneralRe: I was sent this, and... Pin
Sander Rossel9-Feb-19 3:20
professionalSander Rossel9-Feb-19 3:20 
GeneralThought of the Day Pin
OriginalGriff8-Feb-19 4:51
mveOriginalGriff8-Feb-19 4:51 
GeneralRe: Thought of the Day Pin
W Balboos, GHB8-Feb-19 5:34
W Balboos, GHB8-Feb-19 5:34 
GeneralRe: Thought of the Day Pin
Mike Hankey8-Feb-19 8:56
mveMike Hankey8-Feb-19 8:56 
GeneralThey have to be kidding me... Pin
Nelek8-Feb-19 0:32
protectorNelek8-Feb-19 0:32 
Continuing my tests due to problems with the timestamps on the reports...
I create a test file
HANDLE hFile = CreateFileW(L"D:\\PUBLIC\\myTest.txt", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
I get the file timestamp,
I close the file handle,
I convert it to system timestamp
print the results to compare.


First run: It works fine
Second run (file still there): Error already exists as expected
delete the file
Third run: It works semi fine, it goes through everything, but gives me the wrong timestamps
D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh:
fourth run (file still there): Error already exists as expected
delete the file (second one)
fifth run: Still the same timestamp
D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh:
delete the file (third one)
a couple of times more, each time getting deeper in the debugger, always the same Confused | :confused: Confused | :confused: Confused | :confused:

IDEA...
delete the last file
empty recycle bin
Next run: It works good and gives the correct timestamp


As long as the previously generated files still exists in the bin, I get the timestamp of the first generated file although I am opening the handle and closing it again at each run WTF | :WTF: OMG | :OMG: Confused | :confused:

Either I empty the bin after each test or I use a new file name... Not a big problem once found, but... seriously? Dead | X|

EDIT: I have just tested, getting 3 files deleted, permanently delete #1, #3 and keep #2 in the bin... it works fine again. It is keeping the handle only to the very first file of group where the timestamps are read correctly.
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.


modified 8-Feb-19 6:52am.

GeneralRe: They have to be kidding me... Pin
Richard MacCutchan8-Feb-19 0:52
mveRichard MacCutchan8-Feb-19 0:52 
GeneralRe: They have to be kidding me... Pin
Nelek8-Feb-19 1:17
protectorNelek8-Feb-19 1:17 
GeneralRe: They have to be kidding me... Pin
Rage8-Feb-19 1:12
professionalRage8-Feb-19 1:12 
GeneralRe: They have to be kidding me... Pin
Richard Deeming8-Feb-19 1:22
mveRichard Deeming8-Feb-19 1:22 
PraiseRe: They have to be kidding me... Pin
CPallini8-Feb-19 1:32
mveCPallini8-Feb-19 1:32 
PraiseRe: They have to be kidding me... Pin
Nelek8-Feb-19 1:38
protectorNelek8-Feb-19 1:38 
GeneralRe: They have to be kidding me... Pin
Mark_Wallace8-Feb-19 2:33
Mark_Wallace8-Feb-19 2:33 
GeneralRe: They have to be kidding me... Pin
Richard MacCutchan8-Feb-19 3:13
mveRichard MacCutchan8-Feb-19 3:13 
GeneralRe: They have to be kidding me... Pin
RJOberg8-Feb-19 2:00
professionalRJOberg8-Feb-19 2:00 
GeneralRe: They have to be kidding me... Pin
Mark_Wallace8-Feb-19 2:36
Mark_Wallace8-Feb-19 2:36 
GeneralRe: They have to be kidding me... Pin
OriginalGriff8-Feb-19 4:44
mveOriginalGriff8-Feb-19 4:44 
GeneralRe: They have to be kidding me... Pin
Nelek8-Feb-19 4:58
protectorNelek8-Feb-19 4:58 
GeneralRe: They have to be kidding me... Pin
Scott Serl8-Feb-19 5:41
Scott Serl8-Feb-19 5:41 
GeneralRe: They have to be kidding me... Pin
Shuqian Ying8-Feb-19 7:25
Shuqian Ying8-Feb-19 7:25 
GeneralRe: They have to be kidding me... Pin
Nelek8-Feb-19 9:15
protectorNelek8-Feb-19 9:15 
QuestionProgramming Question of the Week? Pin
megaadam8-Feb-19 0:08
professionalmegaadam8-Feb-19 0:08 
AnswerRe: Programming Question of the Week? Pin
OriginalGriff8-Feb-19 0:39
mveOriginalGriff8-Feb-19 0:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.