gpt4 book ai didi

c++ - 为什么 GetLastError() (NOT GetReturnMessage) 在用户名错误时返回 “wrong password”?

转载 作者:可可西里 更新时间:2023-11-01 11:04:43 26 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Why does GetErrorMessage return “wrong password”, when the user name is wrong?

GetErrorMessage g为无效密码和用户名保留相同的字符串,我决定使用 GetLastError(),因为它有一个单独的错误 each.

但是,如果用户名不正确,它仍然会给我代码 12014? (密码错误)但有一个单独的错误代码:ERROR_INTERNET_INCORRECT_USER_NAME - 12013

这不应该起作用吗?或者这也是有意为之的吗?

谢谢。

try
{
pConnect = sess->GetFtpConnection(host, wronguserName, password, port, FALSE );
err= GetLastError(); <---RETURNS INVALID PASSWORD with the wrong username??
}

catch (CInternetException* pEx) //incorrect user name displays incorrect password?
{
TCHAR sz[1024];
pEx->GetErrorMessage(sz, 1024);
printf("ERROR! %s\n", sz);
pEx->Delete();
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com