I have two FILETIME (using System.Runtime.InteropServices variables that contain File Times and I need to compare the two to find out who is never. In the
past (VC++6) I would simply use [-1 == CompareFileTime (&mrft, &ft)] but this doesn't seem to exist in C# [2002] nor am I able to find its replacement. So
how does one go about performing a CompareFileTime of two FileTime variables in C#?
Specifically I need to know if "ft" is more recent then "ftMostRecent"...
Do I (and even can I) DLLImport the function itself (CompareFileTime)? If so how would the DllImport declaration go? And if not what else I can use or what other method can I utilize to get the same result?
Any help would be greatly appreciated.
Thanks,
past (VC++6) I would simply use [-1 == CompareFileTime (&mrft, &ft)] but this doesn't seem to exist in C# [2002] nor am I able to find its replacement. So
how does one go about performing a CompareFileTime of two FileTime variables in C#?
Code:
FILETIME ft, ftMostRecent;
ftMostRecent.dwLowDateTime = 0;
ftMostRecent.dwHighDateTime = 0;
GetFileTime(&ft);
if (-1 == CompareFileTime (&ftMostRecent, &ft))
{
// ... do something ... //
}
Specifically I need to know if "ft" is more recent then "ftMostRecent"...
Do I (and even can I) DLLImport the function itself (CompareFileTime)? If so how would the DllImport declaration go? And if not what else I can use or what other method can I utilize to get the same result?
Any help would be greatly appreciated.
Thanks,