user329713
user329713

Reputation: 11

How to convert system time to 64 bit file time structure of NTFS in DOS

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.

Upvotes: 1

Views: 1285

Answers (1)

Dominik Weber
Dominik Weber

Reputation: 729

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

Upvotes: 1

Related Questions