Hello!
I compiled the following using msvc:
----------8<--------------------------- #include <stdio.h> #include <windows.h>
typedef short CSHORT; typedef struct { CSHORT Year; CSHORT Month; CSHORT Day; CSHORT Hour; CSHORT Minute; CSHORT Second; CSHORT Milliseconds; CSHORT Weekday; } TIME_FIELDS, *PTIME_FIELDS;
typedef VOID (*RtlTimeToTimeFieldsT) (PLARGE_INTEGER Time, PTIME_FIELDS TimeFields);
int main() { LARGE_INTEGER RtlTime; TIME_FIELDS tf; HINSTANCE hLib; RtlTimeToTimeFieldsT RtlTimeToTimeFields;
RtlTime.LowPart = 0x20de5700; RtlTime.HighPart = 0x1c27d90;
hLib = LoadLibrary("ntdll");
RtlTimeToTimeFields = (RtlTimeToTimeFieldsT)GetProcAddress (hLib, "RtlTimeToTimeFields");
RtlTimeToTimeFields(&RtlTime, &tf);
FreeLibrary(hLib);
printf("%d %d %d %d %d %d\n", tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute, tf.Second); return 0; } ----------8<---------------------------
with the following output on win2k. 9 0 10 0 9 10