Click here to Skip to main content
15,911,762 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Compiler Warning C4373 about virtual methods Pin
George_George26-Feb-08 15:09
George_George26-Feb-08 15:09 
GeneralRe: Compiler Warning C4373 about virtual methods [modified] Pin
Rajkumar R26-Feb-08 3:11
Rajkumar R26-Feb-08 3:11 
GeneralRe: Compiler Warning C4373 about virtual methods Pin
George_George26-Feb-08 15:13
George_George26-Feb-08 15:13 
GeneralRe: Compiler Warning C4373 about virtual methods Pin
Rajkumar R26-Feb-08 19:24
Rajkumar R26-Feb-08 19:24 
GeneralRe: Compiler Warning C4373 about virtual methods Pin
George_George26-Feb-08 21:18
George_George26-Feb-08 21:18 
GeneralCasting ULARGE_INTEGER as FILETIME Pin
Ben Aldhouse25-Feb-08 2:07
Ben Aldhouse25-Feb-08 2:07 
GeneralRe: Casting ULARGE_INTEGER as FILETIME Pin
David Crow25-Feb-08 2:19
David Crow25-Feb-08 2:19 
GeneralRe: Casting ULARGE_INTEGER as FILETIME Pin
Ben Aldhouse25-Feb-08 3:10
Ben Aldhouse25-Feb-08 3:10 
Thanks, David, for your encouraging reply.

I have tried the code without the cast and I can't get sensible results.

This is what I now have...

WIN32_FIND_DATA FindFileData;
HANDLE hFind;
hFind = FindFirstFile(strPath, &FindFileData);
CString strYears, strMonths, strDays;

SYSTEMTIME stNow;
GetSystemTime(&stNow);
const FILETIME  ftFile = FindFileData.ftCreationTime;

FILETIME ftNow;
ULARGE_INTEGER ulNowTime, ulFileTime, ulAge;

SystemTimeToFileTime (& stNow, &ftNow);

ulNowTime.HighPart = ftNow.dwHighDateTime;
ulNowTime.LowPart = ftNow.dwLowDateTime;
ulFileTime.HighPart = ftFile.dwHighDateTime;
ulFileTime.LowPart = ftFile.dwLowDateTime;

ulAge.HighPart = ulNowTime.HighPart - ulFileTime.HighPart;
ulAge.LowPart = ulNowTime.LowPart - ulFileTime.LowPart;

FILETIME ftAge;
SYSTEMTIME stAge;

ftAge.dwHighDateTime = ulAge.HighPart;
ftAge.dwLowDateTime = ulAge.LowPart;

SystemTimeToFileTime(&stAge,&ftAge);

strYears.Format("%d", stAge.wYear-1601);
strMonths.Format("%d",stAge.wMonth-1);
strDays.Format("%d",stAge.wDay-1);


I'm foxed. I should really take your advice and move on...

Ben.
QuestionRe: Casting ULARGE_INTEGER as FILETIME Pin
David Crow25-Feb-08 3:53
David Crow25-Feb-08 3:53 
GeneralRe: Casting ULARGE_INTEGER as FILETIME Pin
Ben Aldhouse25-Feb-08 5:02
Ben Aldhouse25-Feb-08 5:02 
QuestionRe: Casting ULARGE_INTEGER as FILETIME Pin
David Crow25-Feb-08 5:09
David Crow25-Feb-08 5:09 
GeneralRe: Casting ULARGE_INTEGER as FILETIME Pin
Ben Aldhouse25-Feb-08 8:37
Ben Aldhouse25-Feb-08 8:37 
GeneralTo sort shortcut menus programmatically [modified] Pin
Mushtaque Nizamani25-Feb-08 0:49
Mushtaque Nizamani25-Feb-08 0:49 
GeneralRe: To sort shortcut menus programmatically Pin
Iain Clarke, Warrior Programmer25-Feb-08 2:17
Iain Clarke, Warrior Programmer25-Feb-08 2:17 
GeneralRe: To sort shortcut menus programmatically Pin
David Crow25-Feb-08 2:43
David Crow25-Feb-08 2:43 
QuestionHow to restore dialog? Pin
sheetal_0625-Feb-08 0:47
sheetal_0625-Feb-08 0:47 
AnswerRe: How to restore dialog? Pin
David Crow25-Feb-08 2:52
David Crow25-Feb-08 2:52 
GeneralRe: How to restore dialog? Pin
sheetal_0627-Feb-08 17:44
sheetal_0627-Feb-08 17:44 
QuestionRe: How to restore dialog? Pin
David Crow28-Feb-08 2:35
David Crow28-Feb-08 2:35 
AnswerManifest for UAC, how to? (VC2005) [Solved] Pin
Maxwell Chen24-Feb-08 23:49
Maxwell Chen24-Feb-08 23:49 
QuestionRe: Manifest for UAC, how to? (VC2005) Pin
Maxwell Chen25-Feb-08 3:15
Maxwell Chen25-Feb-08 3:15 
QuestionGet Client Request Ip Pin
mirtu24-Feb-08 23:15
mirtu24-Feb-08 23:15 
AnswerRe: Get Client Request Ip Pin
Maruf Maniruzzaman24-Feb-08 23:49
Maruf Maniruzzaman24-Feb-08 23:49 
AnswerRe: Get Client Request Ip Pin
Rajkumar R25-Feb-08 3:16
Rajkumar R25-Feb-08 3:16 
QuestionDefine tree item map ( stl ) ... What wrong with my code ? Pin
Yanshof24-Feb-08 21:57
Yanshof24-Feb-08 21:57 

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.