tags:

views:

138

answers:

1

I am using DJGPP compiler for DOS in that i have to use WINDOWS.h which is a win32 api for conversion of system time to file time for NTFS file system.As windows.h is win32 api it is giving error "windows.h-no such file or directory".So how to convert system time to file time (i.e.8 byte structure) in NTFS file system for NTFS file system in DOS.

A: 

Microsoft's FILETIME is multiples of 100ns since January 1, 1601 and a 64 bit unsigned variable.

In NTFS these are stored ad little-endian. You can convert the date yourself:

(uint64)UnixTime * 10000000 + 12219292800000000ui64 uint64 is your 64 bit unsigned type and the ui64 suffix telles the compile the constant is a 64 bit unsigned

Dominik Weber