Possible Duplicate:
Why does GetErrorMessage return “wrong password”, when the user name is wrong?
Since GetErrorMessage gave the same string for invalid password and username, I decided to use GetLastError(), as it has a separate error for each.
However with the incorrect username it still gives me the code 12014? (password error) but there IS a separate error code: ERROR_INTERNET_INCORRECT_USER_NAME - 12013
Shouldn't this work or is this intended too?
Thanks.
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();
}