MCPcopy Create free account
hub / github.com/Endermanch/XPKeygen / FileTimeToTimet

Function FileTimeToTimet

pidgen/util.cpp:109–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107#if defined(WIN32) || defined(_WIN32)
108
109DWORD FileTimeToTimet(LPFILETIME pft)
110{
111 DWORDLONG dwlTime = *(PDWORDLONG)pft;
112
113 if ((DWORDLONG)116444736000000000 < dwlTime)
114 {
115 // convert 100-nanoseconds since January 1, 1601 to
116 // seconds since January 1, 1970
117
118 dwlTime -= (DWORDLONG)116444736000000000;
119 dwlTime /= 10000000;
120 }
121 else
122 {
123 // Seems we have a date before January 1, 1970, just
124 // return January 1, 1970
125
126 dwlTime = 0;
127 }
128
129 return (DWORD)dwlTime;
130}
131
132
133// return day of the year 1 to 366

Callers 1

STDAPICALLTYPE PIDGenRcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected