我如何...错误:来自HRESULT的异常:0x800a9c54 [英] How do I...ERROR: exception from HRESULT: 0x800a9c54

查看:80
本文介绍了我如何...错误:来自HRESULT的异常:0x800a9c54的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

单击开始侦听按钮时出现HRESULT:0x800A9C54错误。使用以下代码:

I am getting "HRESULT: 0x800A9C54" error when clicking the start listening button. with following code:

if (PortText.Text != "")
          {
              w1.LocalPort = Int32.Parse(PortText.Text); // in this line
              w1.Listen();
          }





我正在做这个项目http://www.go4expert.com/articles/winsock-c -sharp-t3312 /请帮我解决这个问题。



问候

Karthi.R



我尝试了什么:



这是我的项目http://www.go4expert.com/articles/ winsock-c-sharp-t3312 /



I'am doing exactly this project http://www.go4expert.com/articles/winsock-c-sharp-t3312/ please help me with this issues.

Regards
Karthi.R

What I have tried:

this is my project http://www.go4expert.com/articles/winsock-c-sharp-t3312/

推荐答案

然后不要问我们:问问写的人。

关注链接,并查看页面底部:有一个论坛,可以向作者发送消息。使用它并问他们 - 他们会更好地了解为什么代码不能在一个完全不同的网站上随机的人工作!
Then don't ask us: ask the people who wrote it.
Follow your link, and look at the bottom of the page: there is a forum there for messages to the author. Use it and ask them - they will have a much better idea why the code doesn't work than random people on a totally different site!


我不知道你在尝试什么但是我怀疑使用WINSOCK是最简单的方法来做你想做的事。

你还应该注意到这篇文章来自2007年,所以可能缺乏对它的支持。



您最好使用 System.Net.Sockets命名空间 [ ^ ]



您可以在MSDN上找到一些基本示例。请参阅套接字代码示例 [ ^ ]



那就是说。你应该确保为'x86'构建你的代码。默认为任何CPU,因此这可能会在64位系统上产生问题。
I don't know what you are trying to do, but I doubt that using WINSOCK is the easiest way to do what you want.
You should also notice that the article is from 2007, so the support of it might be lacking.

You are probably better off using System.Net.Sockets Namespace[^]

You can find some basic examples at MSDN. See Socket Code Examples[^]

That said. you should make sure that that you build your code for 'x86'. The default is 'Any CPU' so this could create a problem on a 64-bit system.


这篇关于我如何...错误:来自HRESULT的异常:0x800a9c54的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆