IMAGE_FILE_HEADER::TimeDateStamp and ctime 
Author Message
 IMAGE_FILE_HEADER::TimeDateStamp and ctime

Hi,

I want to use the IMAGE_FILE_HEADER::TimeDateStamp to print the link date.

However IMAGE_FILE_HEADER::TimeDateStamp is a DWORD ( unsigned long )
and ctime needs a time_t ( long ).

My questions is : Since when DWORD is simply cast to time_t, the value
is a negative value ( = incorrect :) ). Is it possible to safely convert
the DWORD to time_t ?

If a safe conversion is not possible, is there a known way to convert a
DWORD to a human readable date ? ( I have also tried CTime but it uses
the time_t too. )

Thanks in advance.

Devrim



Mon, 22 Nov 2004 03:16:24 GMT  
 IMAGE_FILE_HEADER::TimeDateStamp and ctime

Quote:

>I want to use the IMAGE_FILE_HEADER::TimeDateStamp to print the link date.

>However IMAGE_FILE_HEADER::TimeDateStamp is a DWORD ( unsigned long )
>and ctime needs a time_t ( long ).

>My questions is : Since when DWORD is simply cast to time_t, the value
>is a negative value ( = incorrect :) ). Is it possible to safely convert
>the DWORD to time_t ?

In general, no. But in this particular case it is a time_t that is
stored in the DWORD.

/Mike



Mon, 22 Nov 2004 14:33:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. bufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbuf

2. CABLE BOX DESCRAMBLER PLANS ((LEGAL)),.,.,,.,,,,,,,,,,,,,,,.,.,.,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,,,,.,.,,,,,,,,,,,.,,,,,,, 8077

3. How to get a IMAGE_FILE_HEADER

4. IMAGE_FILE_HEADER

5. MP's Problem

6. GNU MP Library ??

7. MP(3) Multiple Precision Integer Package

8. bug in mp?

9. mp (Multiple Precision Integer Arithmetic Package)

10. MP Library

11. Gnu mp

12. mp.h

 

 
Powered by phpBB® Forum Software