我使用windbg调试故障转储,在windbg的以下输出中,您可以看到“第一次/第二次机会不可用”,为什么这里第一次/第二次机会不可用?这是什么意思?
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(e38.2270): Access violation - code c0000005 (first/second chance not available)
Run Code Online (Sandbox Code Playgroud) 我在LogonUserW失败后立即通过调用GetLastError()来检查错误代码,它总是183,但我不知道为什么LogonUserW会失败并带有这样的值.搜索了msdn,发现183(ERROR_ALREADY_EXISTS)的意思是"当该文件已经存在时无法创建文件",那么LogonUserW会创建什么文件?
有人可以在这里说清楚吗?
if (LogonUserW(uniUserName, uniDomainName, uniPassword, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &token))
{
//do something when success
}
else
{
STI_LOG(LOG_AUTH_DETAILS, ("Login fail\n"), true);
DWORD ec = GetLastError();
String message;
switch (ec)
{
case ERROR_PRIVILEGE_NOT_HELD:
message = "Error Privilege not held\n";
break;
case ERROR_LOGON_FAILURE:
message = "Error Logon Failure\n";
break;
//...
default:
message = "Other errors\n";
}
STI_LOG(LOG_ERROR, ("Fail to log in user: %d-%s\n", ec, message.getCString()), true);
}
Run Code Online (Sandbox Code Playgroud)