积极答复者
csharp调用自动化服务器的ActiveX对象,提示被呼叫方拒绝接收呼叫

问题
答案
-
楼主你好:
没有怎么用过AutoCad类,我也不清楚它是如何通讯的。如果说你是调用这个类的某个方法,而这个方法是要远程通讯获取数据,然后你方可进一步处理的,那么我建议:
1)开辟一个AutoResetEvent对象,初始化false。
2)开辟一个后台线程,在线程中处理需要延时向服务端发送信息的东西。
3)AutoResetEvent实体用WaitOne等待若干毫秒,用if判断,如果有返回值,继续;否则弹出对话框告知客户超时啥的。
Click For donating:Free Rice For the poor
For spamming-sender issues, you can either report it at Microsoft Spamming Issue, or just find "Report Spam Here+Number" at Forum Issue;You can also find "Verify Your Account+Number" at "Forum Issue", where you can submit to be confirmed to paste links or images.
For more things to talk about? StackOverFlow is your choice.- 已建议为答案 Jason Dot WangModerator 2013年10月4日 6:13
- 已标记为答案 Jason Dot WangModerator 2013年10月11日 9:33
-
如果你要处理一些繁忙的业务,还是建议用后台线程,并且规定一个时间(几秒之内),如果完成就完成,没有完成算超时,提示客户。
Click For donating:Free Rice For the poor
For spamming-sender issues, you can either report it at Microsoft Spamming Issue, or just find "Report Spam Here+Number" at Forum Issue;You can also find "Verify Your Account+Number" at "Forum Issue", where you can submit to be confirmed to paste links or images.
For more things to talk about? StackOverFlow is your choice.- 已建议为答案 Jason Dot WangModerator 2013年10月4日 6:13
- 已标记为答案 Jason Dot WangModerator 2013年10月11日 9:33
全部回复
-
楼主你好:
没有怎么用过AutoCad类,我也不清楚它是如何通讯的。如果说你是调用这个类的某个方法,而这个方法是要远程通讯获取数据,然后你方可进一步处理的,那么我建议:
1)开辟一个AutoResetEvent对象,初始化false。
2)开辟一个后台线程,在线程中处理需要延时向服务端发送信息的东西。
3)AutoResetEvent实体用WaitOne等待若干毫秒,用if判断,如果有返回值,继续;否则弹出对话框告知客户超时啥的。
Click For donating:Free Rice For the poor
For spamming-sender issues, you can either report it at Microsoft Spamming Issue, or just find "Report Spam Here+Number" at Forum Issue;You can also find "Verify Your Account+Number" at "Forum Issue", where you can submit to be confirmed to paste links or images.
For more things to talk about? StackOverFlow is your choice.- 已建议为答案 Jason Dot WangModerator 2013年10月4日 6:13
- 已标记为答案 Jason Dot WangModerator 2013年10月11日 9:33
-
如果你要处理一些繁忙的业务,还是建议用后台线程,并且规定一个时间(几秒之内),如果完成就完成,没有完成算超时,提示客户。
Click For donating:Free Rice For the poor
For spamming-sender issues, you can either report it at Microsoft Spamming Issue, or just find "Report Spam Here+Number" at Forum Issue;You can also find "Verify Your Account+Number" at "Forum Issue", where you can submit to be confirmed to paste links or images.
For more things to talk about? StackOverFlow is your choice.- 已建议为答案 Jason Dot WangModerator 2013年10月4日 6:13
- 已标记为答案 Jason Dot WangModerator 2013年10月11日 9:33