可能重複:
Why does GetErrorMessage return 「wrong password」, when the user name is wrong?當用戶名錯誤時,爲什麼GetLastError()(不GetReturnMessage)返回「錯誤密碼」?
由於GetErrorMessage g AVE無效的用戶名和密碼相同的字符串,我決定使用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();
}
呃,原因和上次一樣嗎? – GManNickG 2010-01-30 02:14:37
哎呀!沒有把兩個人和兩個人放在一起......一定是漫長的星期五。 – 2010-02-01 17:02:35