同一代码中的时间函数在xp上崩溃,但在Windows 2003计算机上运行正常。有任何想法吗?从崩溃转储Windows xp上的SystemTimeToTzSpecificLocalTime崩溃
TIME_ZONE_INFORMATION tzi;
SYSTEMTIME stStartUTC;
SYSTEMTIME stStart;
LPCSTR lpszZone;
BOOL bStatus;
FILETIME* pFT;
DWORD dReturn;
pFT = new FILETIME;
if (pFT)
{
pFT->dwHighDateTime = 4294967295ul;
pFT->dwLowDateTime = 4294962295ul;
if (pFT)
{
FileTimeToSystemTime (pFT, &stStartUTC);
}
else
{
GetSystemTime (&stStartUTC);
}
dReturn = GetTimeZoneInformation (&tzi);
bStatus = SystemTimeToTzSpecificLocalTime (&tzi, &stStartUTC, &stStart);
}
栈是:
0816e968 7c85a6f2 00000000 00000024 7c85a6f8 KERNEL32 __ report_gsfailure + 0xda
0816ebf8 7c85a788 0816ec10 0816ec70 0000a8f0 KERNEL32 FindRegTziForCurrentYear + 0x1a5
!0816ec3c 7c85a7bd 0816ec70 0000a8f0 0816eec4 KERNEL32!CheckDynamicTimeZoneInformation + 0x29
0816ec54 7c85a834 0816ec70 0000a8f0 0816eec4 KERNEL32!GetDynamicTimeZoneInfoForTimeZone + 0×17
0816ee7c 7c83b11c 0000a8f0 00000000 0816eec4 KERNEL32!GetTimeZoneInformationForYear +将0x58
0816f020 14f27e38 0816f05c 0816f03c 0816f04c kernel32!SystemTimeToTzSpecificLocalTime + 0x3c
感谢, Mithuna
GetLastError显示FileTimeToSystemTime的返回值为0,这是一个错误,并且错误的格式输出显示参数不正确。我确信参数是不正确的,但不知道是什么导致了崩溃或堆损坏。谢谢。 – mithuna 2010-02-09 23:58:24