通过Silverlight退出浏览器调用Office Communicator [英] Calling Office Communicator via Silverlight Out of Browser

查看:180
本文介绍了通过Silverlight退出浏览器调用Office Communicator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用完浏览器时,我需要调用办公室通讯器来创建一个聊天窗口并直接从Silverlight拨打电话。当在浏览器中运行时,我这样做和它的工作原理很好:

I need to invoke office communicator to create a chat window and phone call directly from Silverlight when running out of browser. When running in browser I do this and it works pretty well:

System.Windows.Browser.HtmlPage.Window.Eval(String.Format("window.open(\"sip:{0}\", target=\"_self\");", sip));



当我运行的浏览器已经获得通过动态调用Communicator.UIAutomation但实际上我不知道接下来该做什么。

When running out of browser as far as I have gotten is to invoke the Communicator.UIAutomation via a dynamic but honestly I don't know what to do next.

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

任何人都有任何建议如何使这项工作?搜索结果为零。

Anyone have any suggestions on how to make this work? Searching has yeilded zero results.

推荐答案

SDK必须预安装在用户计算机中。没有简单的方法来部署它沿着Silvelright OOB应用程序。

The SDK has to be preinstalled in the user machines. There's no easy way to deploy it along your Silvelright OOB application.

您需要使用 SDK

您可以在这里查看文档以获得更多详细信息:C:\Program文件(x86)\ Microsoft Office Communicator \SDK\OCSDK.chm
它主要是指C#,但大多数它可以轻松地移植到Com Automation。作为一个例子看下面的代码开始一个会话

You can check the documentation for more details here: C:\Program Files (x86)\Microsoft Office Communicator\SDK\OCSDK.chm It mainly refers to C#, but most of it could easily be ported to Com Automation. As an example look at the following code to start a conversation

dynamic comm = new ActiveXObject("Communicator.UIAutomation");
dynamic msgrAdv = comm.IMessengerAdvanced;
if(msgrAdv!=null)
{
    try
    {
        object obj = msgrAdv.StartConversation(
                   1, //CONVERSATION_TYPE.CONVERSATION_TYPE_IM,
                   sipUris, // object array of signin names
                   null,
                   "Testing",
                   "1",
                   null);
        windowHandle = long.Parse(obj.ToString());
    }
    catch (COMException ex)
    {
        this.writeToTextBox(
                formReturnErrors.returnComError(ex.ErrorCode)
    );

}

我希望有帮助。注意,从帮助文件中的示例中,我更改了在.NET程序集中定义的一些成员(不能从C#代码引用)。如果你需要这个,我建议打开CommunicatorAPI.dll组件在Reflector。

I hope this help. Noticed that from the example in the help file I changed some of the members that are defined in the .NET Assembly (which can't be referenced from your C# code). If you need this, I would suggest opening the CommunicatorAPI.dll assembly in Reflector.

这篇关于通过Silverlight退出浏览器调用Office Communicator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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