- 浏览: 435248 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
fred7510:
死的啊。。不过还是谢了
flex 截图 -
hechuanshan:
flex状态及动画 -
Da嗒_Sunny:
求使用说明
flex图片裁剪 -
wapj23:
...
flex中定制右键菜单 -
lion_leon:
谢谢!帮了我的大忙了!
利用flashvars给flash传值
在 Microsoft Win 32
Internet (WinInet) API 提供具有轻松访问的独立应用程序以标准的 Internet 协议 (例如 Gopher、 FTP
和 HTTP。 WinInet API 提取到 Win 32 开发人员所熟悉的高级别接口的协议。
以下是 WinInet 函数返回的错误代码的列表: Code Error Message and Description ----- -----------...
<script type="text/javascript"> loadTOCNode(1, 'moreinformation'); </script> 以下是 WinInet 函数返回的错误代码的列表:
Code Error Message and Description ----- ----------------------------- 12001 ERROR_INTERNET_OUT_OF_HANDLES No more handles could be generated at this time. 12002 ERROR_INTERNET_TIMEOUT The request has timed out. 12003 ERROR_INTERNET_EXTENDED_ERROR 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. 12004 ERROR_INTERNET_INTERNAL_ERROR An internal error has occurred. 12005 ERROR_INTERNET_INVALID_URL The URL is invalid. 12006 ERROR_INTERNET_UNRECOGNIZED_SCHEME The URL scheme could not be recognized or is not supported. 12007 ERROR_INTERNET_NAME_NOT_RESOLVED The server name could not be resolved. 12008 ERROR_INTERNET_PROTOCOL_NOT_FOUND The requested protocol could not be located. 12009 ERROR_INTERNET_INVALID_OPTION A request to InternetQueryOption or InternetSetOption specified an invalid option value. 12010 ERROR_INTERNET_BAD_OPTION_LENGTH The length of an option supplied to InternetQueryOption or InternetSetOption is incorrect for the type of option specified. 12011 ERROR_INTERNET_OPTION_NOT_SETTABLE The request option cannot be set, only queried. 12012 ERROR_INTERNET_SHUTDOWN The Win32 Internet function support is being shut down or unloaded. 12013 ERROR_INTERNET_INCORRECT_USER_NAME The request to connect and log on to an FTP server could not be completed because the supplied user name is incorrect. 12014 ERROR_INTERNET_INCORRECT_PASSWORD The request to connect and log on to an FTP server could not be completed because the supplied password is incorrect. 12015 ERROR_INTERNET_LOGIN_FAILURE The request to connect to and log on to an FTP server failed. 12016 ERROR_INTERNET_INVALID_OPERATION The requested operation is invalid. 12017 ERROR_INTERNET_OPERATION_CANCELLED The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed. 12018 ERROR_INTERNET_INCORRECT_HANDLE_TYPE The type of handle supplied is incorrect for this operation. 12019 ERROR_INTERNET_INCORRECT_HANDLE_STATE The requested operation cannot be carried out because the handle supplied is not in the correct state. 12020 ERROR_INTERNET_NOT_PROXY_REQUEST The request cannot be made via a proxy. 12021 ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND A required registry value could not be located. 12022 ERROR_INTERNET_BAD_REGISTRY_PARAMETER A required registry value was located but is an incorrect type or has an invalid value. 12023 ERROR_INTERNET_NO_DIRECT_ACCESS Direct network access cannot be made at this time. 12024 ERROR_INTERNET_NO_CONTEXT An asynchronous request could not be made because a zero context value was supplied. 12025 ERROR_INTERNET_NO_CALLBACK An asynchronous request could not be made because a callback function has not been set. 12026 ERROR_INTERNET_REQUEST_PENDING The required operation could not be completed because one or more requests are pending. 12027 ERROR_INTERNET_INCORRECT_FORMAT The format of the request is invalid. 12028 ERROR_INTERNET_ITEM_NOT_FOUND The requested item could not be located. 12029 ERROR_INTERNET_CANNOT_CONNECT The attempt to connect to the server failed. 12030 ERROR_INTERNET_CONNECTION_ABORTED The connection with the server has been terminated. 12031 ERROR_INTERNET_CONNECTION_RESET The connection with the server has been reset. 12032 ERROR_INTERNET_FORCE_RETRY Calls for the Win32 Internet function to redo the request. 12033 ERROR_INTERNET_INVALID_PROXY_REQUEST The request to the proxy was invalid. 12036 ERROR_INTERNET_HANDLE_EXISTS The request failed because the handle already exists. 12037 ERROR_INTERNET_SEC_CERT_DATE_INVALID SSL certificate date that was received from the server is bad. The certificate is expired. 12038 ERROR_INTERNET_SEC_CERT_CN_INVALID 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. 12039 ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR The application is moving from a non-SSL to an SSL connection because of a redirect. 12040 ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR The application is moving from an SSL to an non-SSL connection because of a redirect. 12041 ERROR_INTERNET_MIXED_SECURITY Indicates that the content is not entirely secure. Some of the content being viewed may have come from unsecured servers. 12042 ERROR_INTERNET_CHG_POST_IS_NON_SECURE The application is posting and attempting to change multiple lines of text on a server that is not secure. 12043 ERROR_INTERNET_POST_IS_NON_SECURE The application is posting data to a server that is not secure. 12110 ERROR_FTP_TRANSFER_IN_PROGRESS The requested operation cannot be made on the FTP session handle because an operation is already in progress. 12111 ERROR_FTP_DROPPED The FTP operation was not completed because the session was aborted. 12130 ERROR_GOPHER_PROTOCOL_ERROR An error was detected while parsing data returned from the gopher server. 12131 ERROR_GOPHER_NOT_FILE The request must be made for a file locator. 12132 ERROR_GOPHER_DATA_ERROR An error was detected while receiving data from the gopher server. 12133 ERROR_GOPHER_END_OF_DATA The end of the data has been reached. 12134 ERROR_GOPHER_INVALID_LOCATOR The supplied locator is not valid. 12135 ERROR_GOPHER_INCORRECT_LOCATOR_TYPE The type of the locator is not correct for this operation. 12136 ERROR_GOPHER_NOT_GOPHER_PLUS The requested operation can only be made against a Gopher+ server or with a locator that specifies a Gopher+ operation. 12137 ERROR_GOPHER_ATTRIBUTE_NOT_FOUND The requested attribute could not be located. 12138 ERROR_GOPHER_UNKNOWN_LOCATOR The locator type is unknown. 12150 ERROR_HTTP_HEADER_NOT_FOUND The requested header could not be located. 12151 ERROR_HTTP_DOWNLEVEL_SERVER The server did not return any headers. 12152 ERROR_HTTP_INVALID_SERVER_RESPONSE The server response could not be parsed. 12153 ERROR_HTTP_INVALID_HEADER The supplied header is invalid. 12154 ERROR_HTTP_INVALID_QUERY_REQUEST The request made to HttpQueryInfo is invalid. 12155 ERROR_HTTP_HEADER_ALREADY_EXISTS The header could not be added because it already exists. 12156 ERROR_HTTP_REDIRECT_FAILED The redirection failed because either the scheme changed (for example, HTTP to FTP) or all attempts made to redirect failed (default is five attempts).
发表评论
-
js小技巧(二)
2009-08-21 10:39 1436//组件是否安装 isComponentInstall ... -
js小技巧(一)
2009-08-21 10:34 1114事件源对象 event.srcEle ... -
解决Ext中Editor回车提交时触发两次completeEdit()的问题
2009-08-04 15:39 2023要使Ext.Editor支持回车提交,增加config co ... -
适应于IE6、FF下的固定于某位置的元素
2009-07-29 14:18 1328FF下要让固定浏览器的位置可以用 position:fixed ... -
层被flash遮盖的解决办法
2009-07-27 18:14 1145将flash的 wmode属性设为transparent 如 ... -
Google Page Speed提示优化信息说明
2009-07-08 14:38 2543关于项目开发者 项目 ... -
文字超长省略(...)的css设置方法
2009-06-29 17:15 2131文件超长时,设置 overflow:hidden;text- ... -
常用css缩写语法总结
2009-06-16 18:21 856使用缩写可以帮助减少你CSS文件的大小,更加容易阅读。css缩 ... -
取iframe里某个div的高度
2009-06-08 15:53 1246document.getElementById("i ... -
dom事件模型级别
2009-06-03 17:41 2682到目前为止,DOM事件模 ... -
什么是Dom元素,什么是Dom文档
2009-06-03 15:59 2660nodeType取值范围: 元素类型 ... -
取某个层应显示在屏幕中间的上部
2009-04-16 17:11 957如图:假设蓝色为浏览器内容区域(A),红色为可见区域(B),绿 ... -
访问html Dom节点的方法
2009-04-15 18:34 1534一、直接获取 1、document.getElementBy ... -
让div的内容随着里面的内容的高度自动增高
2009-04-14 16:25 2223div{clear:both; position:relati ... -
在css引入块中用if 判断浏览器加载不同的css
2009-04-14 15:04 2762<!--[if IE 7]> <link ... -
利用import装载css
2009-04-13 22:13 1271主页面引入: <link rel="styl ... -
css选择器
2009-04-13 22:09 887h1 strong{} li a{} p.memo a{} ... -
IE6下让图片透明
2009-04-10 18:14 10671、下载附件 iepngfix.rar, 解压得到iepng ... -
兼容IE及FF的text-align
2009-04-08 13:43 1339/*IE*/ text-align: left | cente ... -
display的inline、block、inline-block的实际应用
2009-04-07 14:27 2144inline与block经常用到,一个是以内联方式呈现,一个是 ...
相关推荐
以下是对WinINet错误代码的详细解析,涵盖从资源耗尽到协议不支持等多种情况。 1. **12001 ERROR_INTERNET_OUT_OF_HANDLES - 资源耗尽** 当系统无法生成更多句柄时,会返回此错误。在Windows网络编程中,每个网络...
- WinInet API是微软提供的一组动态链接库(DLL),主要包含在`wininet.dll`中,为Windows应用程序提供了标准的互联网访问接口。 - 这些API函数覆盖了从建立连接到发送接收数据的所有网络操作,包括HTTP、HTTPS、...
5. **错误处理**:在处理HTTP身份验证时,需要检查返回的错误代码,如`ERROR_INTERNET_AUTHENTICATION_REQUIRED`,并适当地处理重试或显示登录对话框。 6. **安全性考虑**:尽管WinINet简化了网络编程,但它在多...
通过研究和理解这个项目的代码,你可以更好地掌握如何在MFC中利用WinINet进行文件下载。 总之,WinINet库为Windows应用程序提供了一种强大而灵活的方式,用于处理HTTP和FTP的网络请求。通过封装这些API,你可以构建...
每个WinInet函数都有可能失败,因此需要检查返回值,并根据错误代码采取相应措施。此外,所有打开的句柄(如Internet会话、连接、请求句柄等)在使用完毕后必须使用`InternetCloseHandle()`关闭,以避免资源泄漏。 ...
4. **错误处理与调试**: AutoIt中的WinINet函数通常返回一个错误代码或状态,开发者需要根据这些返回值来判断操作是否成功,并进行适当的错误处理。同时,`WinINetConstants.au3`中的常量可以帮助开发者理解这些错误...
例如,当调用API失败时,需要通过`GetLastError`获取错误代码,并使用`FormatMessage`转换成易懂的错误信息。 6. **资源释放**:完成网络操作后,记得释放所有打开的句柄,以避免资源泄漏: ```cpp ...
此外,错误处理和异常安全也是Wininet编程中不可忽视的部分,确保程序在遇到网络问题时能优雅地处理。 在学习过程中,你可能会遇到如下的挑战: - 多线程编程:在多线程环境中使用Wininet时,需要正确管理和同步...
注意,为了处理可能的错误,上述代码中的每个函数调用都应该进行错误检查。例如,`InternetOpen`、`InternetConnect`、`HttpOpenRequest`等函数可能会返回NULL,这时需要检查错误码并采取适当的措施。 此外,...
MFC将WinInet的功能集成到面向对象的类结构中,使得代码更易读、易维护,并且提供了一些额外的便利功能,如异常处理、自动清理资源等。 MFC为WinInet提供了以下关键类: 1. **CInternetSession**:作为所有...
- 错误处理:Wininet的函数通常返回错误代码,需要捕获并处理可能出现的问题,如网络断开、证书验证失败等。 - 性能优化:频繁的SSL连接可能会消耗大量系统资源,考虑使用连接池来复用已建立的SSL连接。 - 安全性:...
通过分析这个“WinInetDemo”源代码,开发者可以学习到如何在C#环境下使用WinINet库进行网络文件下载,同时也可以了解到HTTP请求的基本流程和网络编程的一些核心概念。这对于提升.NET平台下的网络编程能力大有裨益。...
- 错误处理很重要,每个WinInet API调用都可能失败,必须检查返回值并适当地处理错误。 - 考虑线程安全,如果在多线程环境中使用,需要确保WinInet的会话和连接是线程安全的。 6. **HttpTest文件**: - ...
- 异常处理:由于网络操作可能出现各种异常,如网络中断、超时等,因此必须编写适当的错误处理代码。 - 文件处理:确保在写入文件时正确处理大文件,避免内存不足的问题,可以分块读取和写入。 - 缓存和断点续传...
在提供的压缩包文件"VC编程实现使用WinInet通过HTTP协议读取网上文件--useful"中,可能包含了完整的示例代码,你可以参考学习,以便更好地理解和应用这些概念。记得在实际操作时,根据具体需求进行适当的修改和扩展...
在编写进度条显示代码时,我们需要在状态回调函数中捕获下载进度。每当有新的数据可用时,我们可以更新进度条的百分比,这通常涉及到UI线程与工作线程的同步,以防止UI冻结。可以使用Windows的消息队列或者异步处理...
在实际开发中,为了提高代码的可读性和可维护性,还可以考虑使用智能指针管理`wininet`的句柄,使用异步或线程池来处理网络请求,避免阻塞主线程,以及使用现代C++特性如RAII(Resource Acquisition Is ...
1. **CInternetException**:这是一个异常类,用于处理`Wininet`操作中可能出现的错误。在使用`Wininet`进行网络访问时,可能会遇到各种错误,如网络连接失败、服务器响应超时等。`CInternetException`将这些错误...
3. **错误处理**:掌握WinInet的错误处理机制,如使用`GetLastError`获取错误代码,根据错误代码进行问题排查。 4. **会话管理**:理解网络会话的概念,知道如何初始化和关闭网络会话,以及会话的共享和隔离。 5. ...