从 Silverlight 4 调用 Communicator.UIAutomation

发布于 2024-10-03 22:48:10 字数 786 浏览 3 评论 0原文

我正在尝试从浏览器外 Silverlight 4 应用程序实例化到 Communicator 2007 的 COM 连接。我正在跟踪一些示例代码 - 其中一个(略有不同)示例是 此处 - 但当我运行以下行时出现错误:

dynamic communicator = AutomationFactory.CreateObject("Communicator.UIAutomation");

错误是:

Failed to create an object instance for the specified ProgID.

我已经下载并安装了我认为是的 正确的 SDK,但 OLEView 不是显示 DLL 已注册 - 我需要做些什么才能在 SDK 中注册 DLL 吗? regsvr32 似乎不起作用。

我这一切都错了吗?是否有更好的选择,也许使用统一通信客户端(1.0 或 2.0)SDK?

I'm trying to instantiate a COM connection to Communicator 2007 from an Out of Browser Silverlight 4 app. I'm following some sample code - one (slightly different) example of which is here - but I'm getting an error when I run the following line:

dynamic communicator = AutomationFactory.CreateObject("Communicator.UIAutomation");

The error is:

Failed to create an object instance for the specified ProgID.

I've downloaded and installed what I believe is the right SDK, but OLEView isn't showing the DLL's as registered - is there something I need to do to register the DLL's in the SDK? regsvr32 doesn't seem to work.

Am I going about this all wrong? Is there a better option, perhaps with the Unified Communications Client (1.0 or 2.0) SDK?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不一样的天空 2024-10-10 22:48:10

当时 Communicator 是否正在运行?它必须正在运行才能使用 API。

当通信器运行时,上面的代码对我来说工作得很好,但是我可以通过确保当上面的行被击中时它不运行来复制您的错误。

我很确定 SDK 已注册正常,因为如果没有注册,您会收到略有不同的错误:

No object was found registered for specified ProgID.

关于正确的 SDK - 这取决于您想要实现的目标。自动化 API(即您正在使用的 API)将允许您自动运行 Communicator 实例,因此它非常适合通过 Communicator UI 获取状态信息、启动 IM 对话、拨打电话等。仅当不能保证 Communicator 运行,或者您需要提供自己的 UI 时,您才需要查看 UCCA。

我在此处发表了有关各种 API 的博客,

还有一件事需要记住,如果可以选择升级到 Lync,那么 SDK 内置了一大堆非常有用的 Silverlight/WPF 控件 - 一些信息 此处

Is Communicator running at the time? It must be running in order to use the API.

The above code works fine for me, when communicator is running, but I can replicate your error by ensuring that it isn't running when the above line gets hit.

I'm pretty sure the SDK is registered OK, as you'g get a slightly different error if it wasn't:

No object was found registered for specified ProgID.

With regards to the right SDK - it depends on what you're trying to achieve. The automation API (i.e. the one you're using) will allow you to automate the running instance of Communicator, so its great for e.g. obtaining presence info, starting IM conversations, placing phone calls etc uning the Communicator UI. You should only need to look at UCCA if its not guaranteed that Communicator will be running, or if you need to e.g. provide your own UI.

I blogged about the various APIs here

One more thing to bear in mind, if upgrading to Lync is an option, then the SDK has a whole bunch of really useful Silverlight/WPF controls built in - some info here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文