0
考虑以下情形:如果在句柄h的异步读取尚未完成之前调用CloseHandle(h)会怎么样?
auto h = CreateFile(...);
ReadFileEx(h, ...); // Asynchronous read for a large block of data. say, 1GB.
CloseHandle(h);
// If the read has not yet finished here, what will happen? Big Bang???
未定义的行为。 –
@Alok,你可以把我指向特定的MSDN页面吗? – xmllmx
如果可以,请尝试使用C89标准中描述的文件管理功能,http://linux.die.net/man/3/fopen和http://linux.die.net/man/3/fclose –