LyncClient.GetClient触发InvalidCastException [英] LyncClient.GetClient triggers InvalidCastException

查看:45
本文介绍了LyncClient.GetClient触发InvalidCastException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我将Lync API连接到正在运行的Lync客户端实例时出现问题。每当我尝试

I have problems with connection Lync API to a running Lync client instance. Whenever i tried

if (Microsoft.Lync.Model.LyncClient.GetClient() == null)

我得到 InvalidCastException ,其中

消息  "指定演员表无效。"

Message  "Specified cast is not valid."

StackTrace:#  在Microsoft.Office.Uc.IUCOfficeIntegration.GetInterface(String _version,OIInterface _interface)#  在Microsoft.Lync.Model.LyncClient.GetClient()

StackTrace: #   at Microsoft.Office.Uc.IUCOfficeIntegration.GetInterface(String _version, OIInterface _interface)#   at Microsoft.Lync.Model.LyncClient.GetClient()

我搜索了整个网络和Lync SDK,但我找不到任何有关InvalidCastException的信息。我们可以看到很多Lync HowTo示例,它们会捕获这种异常。

I searched all over the web and Lync SDK, but i could not find anything about InvalidCastException. We can see just many Lync HowTo examples, where they catch this sort of Exception.

Lync Client是最后一个32位试用版,从http://www.microsoft.com/下载下载/ en / details.aspx?id = 5484并且工作正常。

The Lync Client is the last 32bit trial version, downloaded from http://www.microsoft.com/download/en/details.aspx?id=5484 and is working fine.

操作系统是32位XP witsh SP3。

Operating System is 32-bit XP witsh SP3.

什么可以是问题? Lync SDK API文档未提供任何疑难解答帮助。

What could be the problem? The Lync SDK API documentation does not provide any troubleshooting help.

任何建议都将非常受欢迎。谢谢。

Any suggestion would be most appreciate. Thank you.

最好的问候,Peter Korosec

Best regards, Peter Korosec

推荐答案

我想你应确保lync SDK也是32位

I think you should make sure that the lync SDK is 32-bit too

还尝试删除您正在处理的项目的UC.Office参考表格

also try to remove the UC.Office reference form the project you are working on

最后,尝试运行在Lync SDK中编写的任何代码示例

Last, try to run any code samples written in Lync SDK


这篇关于LyncClient.GetClient触发InvalidCastException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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