在 Visual Studio 2015 中使用 XP Targeting 编译时在 Windows XP 上出现致命错误

问题描述:

我使用 TR2 的文件系统库通过 last_write_time 函数检索文件的上次修改时间,但是在 Windows XP 上调用 last_write_time 时会发生致命错误.

I'm using TR2's filesystem library to retrieve the last modified time of a file with the last_write_time function however a fatal error occurs on Windows XP when last_write_time is called.

我无法在 Windows XP 上隔离导致致命错误的代码,但在 Windows 7/8/10 上则无法隔离.

I'm unable to isolate the code that's causing a fatal error on Windows XP but not on Windows 7/8/10.

这是我尝试使用一个不会出现致命错误的 EXE 项目来隔离有问题的代码:main.cpp

Here's my attempt at isolating the problematic code with a EXE project which does not give a fatal error: main.cpp

错误如下:

异常:0xC0000005 (ACCESS_VIOLATION) at 001B:07043EAC

Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:07043EAC

'0x07043EAC' 处的指令引用了 '0x00000000' 处的内存.

The instruction at '0x07043EAC' referenced memory at '0x00000000'.

无法读取"内存.

我猜这是 XP 和 Server 2003 上的 TLS 问题?

I guess this is the TLS issue on XP and Server 2003?

http://www.nynaeve.net/?p=181