I am making a program, in C++ using Visual Studio 2005, that needs to create a watermark with the time on a set of images.
These images are taken from a video that were processed at certain time intervals. What I am trying to do is to modify the time on each image through SYSTEMTIME. I looked at the MSDN and it says not to modify the values within SYSTEMTIME itself, but to convert it into a FILETIME and then an ULARGE_INTEGER. My question is how is the ULARGE_INTEGER split up? Is the HighPart the date and the Low Part the time and if that's the case how to I take into account rollover? Like if a image shows up at 11:58pm on 2/25/2011 and goes through until 12:11 2/26/2011? Would just adding the specified value automatically be taken into account and shown when I convert it back into a SYSTEMTIME variable?
Thanks in advance for your help.
They suggest converting
SYSTEMTIME
toFILETIME
, which is a number of ticks since an epoch. You can then add the required number of 'ticks' (i.e. 100ns intervals) to indicate your time, and convert back toSYSTEMTIME
.The
ULARGE_INTEGER
struct is a union with aQuadPart
member, which is a 64bit number, that can be directly added to (on recent hardware).