FTP操作失败返回码

来源:互联网 发布:奥迪矩阵大灯 编辑:程序博客网 时间:2024/04/30 12:14

 Case 12003:
'extended error. Retrieve the details using
'the InternetGetLastResponseInfo API.

sBuffer = Space$(256)
nBuffer = Len(sBuffer)

If InternetGetLastResponseInfo(lErrorCode, _
sBuffer, _
nBuffer) Then
GetErr = StripNull(sBuffer)
Else
GetErr = "Extended error returned from server."
End If

Case 12004: GetErr = _
"An internal error has occurred."
Case 12005: GetErr = _
"URL is invalid."
Case 12006: GetErr = _
"URL scheme could not be recognized, or is not supported."
Case 12007: GetErr = _
"Server name could not be resolved."
Case 12008: GetErr = _
"Requested protocol could not be located."
Case 12009: GetErr = _
"Request to InternetQueryOption or InternetSetOption" & _
" specified an invalid option value."
Case 12010: GetErr = _
"Length of an option supplied to InternetQueryOption or" & _
" InternetSetOption is incorrect for the type of" & _
" option specified."
Case 12011: GetErr = _
"Request option can not be set, only queried. "
Case 12012: GetErr = _
"Win32 Internet support is being shutdown or unloaded."
Case 12013: GetErr = _
"Request to connect and login to an FTP server could not" & _
" be completed because the supplied user name is incorrect."
Case 12014: GetErr = _
"Request to connect and login to an FTP server could not" & _
" be completed because the supplied password is incorrect. "
Case 12015: GetErr = _
"Request to connect to and login to an FTP server failed."
Case 12016: GetErr = _
"Requested operation is invalid. "
Case 12017: GetErr = _
"Operation was canceled, usually because the handle on" & _
" which the request was operating was closed before the" & _
" operation completed."
Case 12018: GetErr = _
"Type of handle supplied is incorrect for this operation."
Case 12019: GetErr = _
"Requested operation can not be carried out because the" & _
" handle supplied is not in the correct state."
Case 12020: GetErr = _
"Request can not be made via a proxy."
Case 12021: GetErr = _
"Required registry value could not be located. "
Case 12022: GetErr = _
"Required registry value was located but is an incorrect" & _
" type or has an invalid value."
Case 12023: GetErr = _
"Direct network access cannot be made at this time. "
Case 12024: GetErr = _
"Asynchronous request could not be made because a zero" & _
" context value was supplied."
Case 12025: GetErr = _
"Asynchronous request could not be made because a" & _
" callback function has not been set."
Case 12026: GetErr = _
"Required operation could not be completed because" & _
" one or more requests are pending."
Case 12027: GetErr = _
"Format of the request is invalid."
Case 12028: GetErr = _
"Requested item could not be located."
Case 12029: GetErr = _
"Attempt to connect to the server failed."
Case 12030: GetErr = _
"Connection with the server has been terminated."
Case 12031: GetErr = _
"Connection with the server has been reset."
Case 12036: GetErr = _
"Request failed because the handle already exists."
Case Else: GetErr = _
"Error details not available."


If you found this post to be helpful, please rate it to let others know it was useful.