Juri Shutenko Personal Homepage. Visual FoxPro.

 

Сообщения об ошибках

В соответствующих случаях функции WinINet возвращают коды ошибок. Ниже приведены ошибки, характерные для функций WinINet.

Символьная константа Dec-значение Описание
ERROR_FTP_DROPPED 12111 Опарация FTP незавершена, так как сессия была преждевременно прекращена
ERROR_FTP_NO_PASSIVE_MODE 12112 На требуемом сервере режим Passive недоступен.
ERROR_FTP_TRANSFER_IN_PROGRESS 12110 Требуемая операция не может быть выполнена на хэндле FTP сессии, так как операция уже находится в процессе выполнения.
ERROR_GOPHER_ATTRIBUTE_NOT_FOUND 12137 The requested attribute could not be located.
ERROR_GOPHER_DATA_ERROR 12132 An error was detected while receiving data from the Gopher server.
ERROR_GOPHER_END_OF_DATA 12133 The end of the data has been reached.
ERROR_GOPHER_INCORRECT_LOCATOR_TYPE 12135 The type of the locator is not correct for this operation.
ERROR_GOPHER_INVALID_LOCATOR 12134 The supplied locator is not valid.
ERROR_GOPHER_NOT_FILE 12131 The request must be made for a file locator.
ERROR_GOPHER_NOT_GOPHER_PLUS 12136 The requested operation can be made only against a Gopher+ server, or with a locator that specifies a Gopher+ operation.
ERROR_GOPHER_PROTOCOL_ERROR 12130 An error was detected while parsing data returned from the Gopher server.
ERROR_GOPHER_UNKNOWN_LOCATOR 12138 The locator type is unknown.
ERROR_HTTP_COOKIE_DECLINED 12162 The HTTP cookie was declined by the server.
ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION 12161 The HTTP cookie requires confirmation.
ERROR_HTTP_DOWNLEVEL_SERVER 12151 The server did not return any headers.
ERROR_HTTP_HEADER_ALREADY_EXISTS 12155 The header could not be added because it already exists.
ERROR_HTTP_HEADER_NOT_FOUND 12150 The requested header could not be located.
ERROR_HTTP_INVALID_HEADER 12153 The supplied header is invalid.
ERROR_HTTP_INVALID_QUERY_REQUEST 12154 The request made to HttpQueryInfo is invalid.
ERROR_HTTP_INVALID_SERVER_RESPONSE 12152 The server response could not be parsed.
ERROR_HTTP_NOT_REDIRECTED 12160 The HTTP request was not redirected.
ERROR_HTTP_REDIRECT_FAILED 12156 The redirection failed because either the scheme changed (for example, HTTP to FTP) or all attempts made to redirect failed (default is five attempts)
ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION 12168 The redirection requires user confirmation.
ERROR_INTERNET_ASYNC_THREAD_FAILED 12047 The application could not start an asynchronous thread.
ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT 12166 There was an error in the automatic proxy configuration script.
ERROR_INTERNET_BAD_OPTION_LENGTH 12010 The length of an option supplied to InternetQueryOption or InternetSetOption is incorrect for the type of option specified.
ERROR_INTERNET_BAD_REGISTRY_PARAMETER 12022 A required registry value was located but is an incorrect type or has an invalid value.
ERROR_INTERNET_CANNOT_CONNECT 12029 The attempt to connect to the server failed.
ERROR_INTERNET_CHG_POST_IS_NON_SECURE 12042 The application is posting and attempting to change multiple lines of text on a server that is not secure.
ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED 12044 The server is requesting client authentication.
ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP 12046 Client authorization is not set up on this computer.
ERROR_INTERNET_CONNECTION_ABORTED 12030 The connection with the server has been terminated.
ERROR_INTERNET_CONNECTION_RESET 12031 The connection with the server has been reset.
ERROR_INTERNET_DIALOG_PENDING 12049 Another thread has a password dialog box in progress.
ERROR_INTERNET_DISCONNECTED 12163 The Internet connection has been lost.
ERROR_INTERNET_EXTENDED_ERROR 12003 An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call InternetGetLastResponseInfo to retrieve the error text.
ERROR_INTERNET_FAILED_DUETOSECURITYCHECK 12171 The function failed due to a security check.
ERROR_INTERNET_FORCE_RETRY 12032 The function needs to redo the request.
ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED 12054 The requested resource requires Fortezza authentication.
ERROR_INTERNET_HANDLE_EXISTS 12036 The request failed because the handle already exists.
ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR 12039 The application is moving from a non-SSL to an SSL connection because of a redirect.
ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR 12052 The data being submitted to an SSL connection is being redirected to a non-SSL connection.
ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR 12040 The application is moving from an SSL to an non-SSL connection because of a redirect.
ERROR_INTERNET_INCORRECT_FORMAT 12027 The format of the request is invalid.
ERROR_INTERNET_INCORRECT_HANDLE_STATE 12019 The requested operation cannot be carried out because the handle supplied is not in the correct state.
ERROR_INTERNET_INCORRECT_HANDLE_TYPE 12018 The type of handle supplied is incorrect for this operation.
ERROR_INTERNET_INCORRECT_PASSWORD 12014 The request to connect and log on to an FTP server could not be completed because the supplied password is incorrect.
ERROR_INTERNET_INCORRECT_USER_NAME 12013 The request to connect and log on to an FTP server could not be completed because the supplied user name is incorrect.
ERROR_INTERNET_INSERT_CDROM 12053 The request requires a CD-ROM to be inserted in the CD-ROM drive to locate the resource requested.
ERROR_INTERNET_INTERNAL_ERROR 12004 An internal error has occurred.
ERROR_INTERNET_INVALID_CA 12045 The function is unfamiliar with the Certificate Authority that generated the server's certificate.
ERROR_INTERNET_INVALID_OPERATION 12016 The requested operation is invalid.
ERROR_INTERNET_INVALID_OPTION 12009 A request to InternetQueryOption or InternetSetOption specified an invalid option value.
ERROR_INTERNET_INVALID_PROXY_REQUEST 12033 The request to the proxy was invalid.
ERROR_INTERNET_INVALID_URL 12005 The URL is invalid.
ERROR_INTERNET_ITEM_NOT_FOUND 12028 The requested item could not be located.
ERROR_INTERNET_LOGIN_FAILURE 12015 The request to connect and log on to an FTP server failed.
ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY 12174 The MS-Logoff digest header has been returned from the Web site. This header specifically instructs the digest package to purge credentials for the associated realm. This error will only be returned if INTERNET_ERROR_MASK_LOGIN_FAILURE_DISPLAY_ENTITY_BODY has been set.
ERROR_INTERNET_MIXED_SECURITY 12041 The content is not entirely secure. Some of the content being viewed may have come from unsecured servers.
ERROR_INTERNET_NAME_NOT_RESOLVED 12007 The server name could not be resolved.
ERROR_INTERNET_NEED_MSN_SSPI_PKG 12173 Not currently implemented.
ERROR_INTERNET_NEED_UI 12034 A user interface or other blocking operation has been requested.
ERROR_INTERNET_NO_CALLBACK 12025 An asynchronous request could not be made because a callback function has not been set.
ERROR_INTERNET_NO_CONTEXT 12024 An asynchronous request could not be made because a zero context value was supplied.
ERROR_INTERNET_NO_DIRECT_ACCESS 12023 Direct network access cannot be made at this time.
ERROR_INTERNET_NOT_INITIALIZED 12172 Initialization of the WinINet API has not occurred. Indicates that a higher-level function, such as InternetOpen, has not been called yet.
ERROR_INTERNET_NOT_PROXY_REQUEST 12020 The request cannot be made via a proxy.
ERROR_INTERNET_OPERATION_CANCELLED 12017 The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed
ERROR_INTERNET_OPTION_NOT_SETTABLE 12011 The requested option cannot be set, only queried.
ERROR_INTERNET_OUT_OF_HANDLES 12001 No more handles could be generated at this time.
ERROR_INTERNET_POST_IS_NON_SECURE 12043 The application is posting data to a server that is not secure.
ERROR_INTERNET_PROTOCOL_NOT_FOUND 12008 The requested protocol could not be located.
ERROR_INTERNET_PROXY_SERVER_UNREACHABLE 12165 The designated proxy server cannot be reached.
ERROR_INTERNET_REDIRECT_SCHEME_CHANGE 12048 The function could not handle the redirection, because the scheme changed (for example, HTTP to FTP).
ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND 12021 A required registry value could not be located.
ERROR_INTERNET_REQUEST_PENDING 12026 The required operation could not be completed because one or more requests are pending.
ERROR_INTERNET_RETRY_DIALOG 12050 The dialog box should be retried.
ERROR_INTERNET_SEC_CERT_CN_INVALID 12038 SSL certificate common name (host name field) is incorrect—for example, if you entered www.server.com and the common name on the certificate says www.different.com.
ERROR_INTERNET_SEC_CERT_DATE_INVALID 12037 SSL certificate date that was received from the server is bad. The certificate is expired.
ERROR_INTERNET_SEC_CERT_ERRORS 12055 The SSL certificate contains errors.
ERROR_INTERNET_SEC_CERT_NO_REV 12056  
ERROR_INTERNET_SEC_CERT_REV_FAILED 12057  
ERROR_INTERNET_SEC_CERT_REVOKED 12170 SSL certificate was revoked.
ERROR_INTERNET_SEC_INVALID_CERT 12169 SSL certificate is invalid.
ERROR_INTERNET_SECURITY_CHANNEL_ERROR 12157 The application experienced an internal error loading the SSL libraries.
ERROR_INTERNET_SERVER_UNREACHABLE 12164 The Web site or server indicated is unreachable.
ERROR_INTERNET_SHUTDOWN 12012 WinINet support is being shut down or unloaded.
ERROR_INTERNET_TCPIP_NOT_INSTALLED 12159 The required protocol stack is not loaded and the application cannot start WinSock.
ERROR_INTERNET_TIMEOUT 12002 The request has timed out.
ERROR_INTERNET_UNABLE_TO_CACHE_FILE 12158 The function was unable to cache the file.
ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT 12167 The automatic proxy configuration script could not be downloaded. The INTERNET_FLAG_MUST_CACHE_REQUEST flag was set.
ERROR_INTERNET_UNRECOGNIZED_SCHEME 12006 Схема URL не распознана или не поддерживается.
#Define FLAG_ICC_FORCE_CONNECTION  0x00000001

Declare Integer InternetCheckConnection In wininet;
   STRING  lpszUrl,;
   INTEGER dwFlags,;
   INTEGER dwReserved

Declare Integer GetLastError In kernel32

Local llCanConnect2Host,lnError

* следующая строка кода вызовет ошибку,
* так как в схеме протокола HTTP 
* вместо slash используются backslash

llCanConnect2Host=;
   InternetCheckConnection(;
      "http:\\192.168.1.1",;
      FLAG_ICC_FORCE_CONNECTION,;
      0;
   )
? Iif(;
llCanConnect2Host=0,;
   "Can't connect to host!",;
   "Connection may be successfully established!";
)
lnError=GetLastError()
If lnError !=0
   ? "An error occurs on function call! Error number is:"
   ?? lnError
Endif
ERROR_INVALID_HANDLE 6 The handle that was passed to the API has been either invalidated or closed. Header: Declared in Winerror.h
ERROR_MORE_DATA 234 More data is available. Header: Declared in Winerror.h
ERROR_NO_MORE_FILES 18 No more files have been found. Header: Declared in Winerror.h
ERROR_NO_MORE_ITEMS 259 No more items have been found. Header: Declared in Winerror.h
#DEFINE ERROR_FTP_DROPPED 12111
#DEFINE ERROR_FTP_NO_PASSIVE_MODE 12112
#DEFINE ERROR_FTP_TRANSFER_IN_PROGRESS 12110
#DEFINE ERROR_GOPHER_ATTRIBUTE_NOT_FOUND 12137
#DEFINE ERROR_GOPHER_DATA_ERROR 12132
#DEFINE ERROR_GOPHER_END_OF_DATA 12133
#DEFINE ERROR_GOPHER_INCORRECT_LOCATOR_TYPE 12135
#DEFINE ERROR_GOPHER_INVALID_LOCATOR 12134
#DEFINE ERROR_GOPHER_NOT_FILE 12131
#DEFINE ERROR_GOPHER_NOT_GOPHER_PLUS 12136
#DEFINE ERROR_GOPHER_PROTOCOL_ERROR 12130
#DEFINE ERROR_GOPHER_UNKNOWN_LOCATOR 12138
#DEFINE ERROR_HTTP_COOKIE_DECLINED 12162
#DEFINE ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION 12161
#DEFINE ERROR_HTTP_DOWNLEVEL_SERVER 12151
#DEFINE ERROR_HTTP_HEADER_ALREADY_EXISTS 12155
#DEFINE ERROR_HTTP_HEADER_NOT_FOUND 12150
#DEFINE ERROR_HTTP_INVALID_HEADER 12153
#DEFINE ERROR_HTTP_INVALID_QUERY_REQUEST 12154
#DEFINE ERROR_HTTP_INVALID_SERVER_RESPONSE 12152
#DEFINE ERROR_HTTP_NOT_REDIRECTED 12160
#DEFINE ERROR_HTTP_REDIRECT_FAILED 12156
#DEFINE ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION 12168
#DEFINE ERROR_INTERNET_ASYNC_THREAD_FAILED 12047
#DEFINE ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT 12166
#DEFINE ERROR_INTERNET_BAD_OPTION_LENGTH 12010
#DEFINE ERROR_INTERNET_BAD_REGISTRY_PARAMETER 12022
#DEFINE ERROR_INTERNET_CANNOT_CONNECT 12029
#DEFINE ERROR_INTERNET_CHG_POST_IS_NON_SECURE 12042
#DEFINE ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED 12044
#DEFINE ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP 12046
#DEFINE ERROR_INTERNET_CONNECTION_ABORTED 12030
#DEFINE ERROR_INTERNET_CONNECTION_RESET 12031
#DEFINE ERROR_INTERNET_DIALOG_PENDING 12049
#DEFINE ERROR_INTERNET_DISCONNECTED 12163
#DEFINE ERROR_INTERNET_EXTENDED_ERROR 12003
#DEFINE ERROR_INTERNET_FAILED_DUETOSECURITYCHECK 12171
#DEFINE ERROR_INTERNET_FORCE_RETRY 12032
#DEFINE ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED 12054
#DEFINE ERROR_INTERNET_HANDLE_EXISTS 12036
#DEFINE ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR 12039
#DEFINE ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR 12052
#DEFINE ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR 12040
#DEFINE ERROR_INTERNET_INCORRECT_FORMAT 12027
#DEFINE ERROR_INTERNET_INCORRECT_HANDLE_STATE 12019
#DEFINE ERROR_INTERNET_INCORRECT_HANDLE_TYPE 12018
#DEFINE ERROR_INTERNET_INCORRECT_PASSWORD 12014
#DEFINE ERROR_INTERNET_INCORRECT_USER_NAME 12013
#DEFINE ERROR_INTERNET_INSERT_CDROM 12053
#DEFINE ERROR_INTERNET_INTERNAL_ERROR 12004
#DEFINE ERROR_INTERNET_INVALID_CA 12045
#DEFINE ERROR_INTERNET_INVALID_OPERATION 12016
#DEFINE ERROR_INTERNET_INVALID_OPTION 12009
#DEFINE ERROR_INTERNET_INVALID_PROXY_REQUEST 12033
#DEFINE ERROR_INTERNET_INVALID_URL 12005
#DEFINE ERROR_INTERNET_ITEM_NOT_FOUND 12028
#DEFINE ERROR_INTERNET_LOGIN_FAILURE 12015
#DEFINE ERROR_INTERNET_LOGIN_FAILURE_DISPLAY_ENTITY_BODY 12174
#DEFINE ERROR_INTERNET_MIXED_SECURITY 12041
#DEFINE ERROR_INTERNET_NAME_NOT_RESOLVED 12007
#DEFINE ERROR_INTERNET_NEED_MSN_SSPI_PKG 12173
#DEFINE ERROR_INTERNET_NEED_UI 12034
#DEFINE ERROR_INTERNET_NO_CALLBACK 12025
#DEFINE ERROR_INTERNET_NO_CONTEXT 12024
#DEFINE ERROR_INTERNET_NO_DIRECT_ACCESS 12023
#DEFINE ERROR_INTERNET_NOT_INITIALIZED 12172
#DEFINE ERROR_INTERNET_NOT_PROXY_REQUEST 12020
#DEFINE ERROR_INTERNET_OPERATION_CANCELLED 12017
#DEFINE ERROR_INTERNET_OPTION_NOT_SETTABLE 12011
#DEFINE ERROR_INTERNET_OUT_OF_HANDLES 12001
#DEFINE ERROR_INTERNET_POST_IS_NON_SECURE 12043
#DEFINE ERROR_INTERNET_PROTOCOL_NOT_FOUND 12008
#DEFINE ERROR_INTERNET_PROXY_SERVER_UNREACHABLE 12165
#DEFINE ERROR_INTERNET_REDIRECT_SCHEME_CHANGE 12048
#DEFINE ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND 12021
#DEFINE ERROR_INTERNET_REQUEST_PENDING 12026
#DEFINE ERROR_INTERNET_RETRY_DIALOG 12050
#DEFINE ERROR_INTERNET_SEC_CERT_CN_INVALID 12038
#DEFINE ERROR_INTERNET_SEC_CERT_DATE_INVALID 12037
#DEFINE ERROR_INTERNET_SEC_CERT_ERRORS 12055
#DEFINE ERROR_INTERNET_SEC_CERT_NO_REV 12056
#DEFINE ERROR_INTERNET_SEC_CERT_REV_FAILED 12057
#DEFINE ERROR_INTERNET_SEC_CERT_REVOKED 12170
#DEFINE ERROR_INTERNET_SEC_INVALID_CERT 12169
#DEFINE ERROR_INTERNET_SECURITY_CHANNEL_ERROR 12157
#DEFINE ERROR_INTERNET_SERVER_UNREACHABLE 12164
#DEFINE ERROR_INTERNET_SHUTDOWN 12012
#DEFINE ERROR_INTERNET_TCPIP_NOT_INSTALLED 12159
#DEFINE ERROR_INTERNET_TIMEOUT 12002
#DEFINE ERROR_INTERNET_UNABLE_TO_CACHE_FILE 12158
#DEFINE ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT 12167
#DEFINE ERROR_INTERNET_UNRECOGNIZED_SCHEME 12006
#DEFINE ERROR_INVALID_HANDLE 6
*The handle that was passed to the API has been either invalidated or closed.
*Header:  Declared in Winerror.h
#DEFINE ERROR_MORE_DATA 234
*More data is available. 
*Header:  Declared in Winerror.h
#DEFINE ERROR_NO_MORE_FILES 18
*No more files have been found. 
*Header:  Declared in Winerror.h
#DEFINE ERROR_NO_MORE_ITEMS  259
*No more items have been found. 
*Header:  Declared in Winerror.h
Cелектор для быстрого перехода на сайты, связанные с Visual FoxPro.