To be honest, I think the best way to do this is to abandon WinAPI. I say, use the standard C function, you'll make two function calls, instead of that huge ugly code you have there. If you are using MSVC++, I think it calls the function _stat(), if you are using another compiler it is probably stat().
#include <sys/types.h>
#include <sys/stat.h>
struct _stat sb;
_stat("path/to/the/file.extension", &sb);
sprintf(temp, "%u", sb.st_ctime);
That will do the same thing as all that ugly code you have to have to work with a FILETIME.
Edit:
MSVC++ also calls the struct _stat, other compilers call it stat.
Last edited by codemastr; 02/08/03 03:41 AM.