设置:PRESENCE_PROPERTY.PRESENCE_PROP_PRESENCE_NOTE时出错 [英] Error on setting the : PRESENCE_PROPERTY.PRESENCE_PROP_PRESENCE_NOTE

查看:92
本文介绍了设置:PRESENCE_PROPERTY.PRESENCE_PROP_PRESENCE_NOTE时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来好像这个问题有一段时间被问到但是从来没有回答过所以我要再采取另一种方法,看看是否有人找到了解决方案。

我正在尝试设置Presence Note但是每次我设置它时都会收到以下错误。

"参数异常:值不在预期范围内。"

有没有人遇到过这个并且能够无错误地更改注释。

我的示例代码

It looks likes this question was asked a while back but never answers so I'm going to take another stab and see if anyone has found a solution.

I'm trying to set the Presence Note but each time I set it I receive the following error.

"Argument Exception:Value does not fall within the expected range."

Has anyone ran into this and been able to change the note without error.

My sample Code

< tr> < tr>
communicator = new CommunicatorAPI.Messenger();
IMessengerContactAdvanced a_contact =(IMessengerContactAdvanced)communicator.GetContact(" theemail@someplace.com" ,communicator.MyServiceId);
object [] mpp = new object [11];
if (a_contact!= null
{
尝试
{
mpp [( int )PRESENCE_PROPERTY.PRESENCE_PROP_PRESENCE_NOTE] = " test from API" ;
a_contact.PresenceProperties =( object )mpp;
}
catch (COMException ce)
{
Console.WriteLine(" COM Exception:" +
ce.ErrorCode.ToString());
}
catch (ArgumentException AE)
{
Console.WriteLine(" Argument Exception:" +
AE.Message.ToString()。Trim());
}
catch (IndexOutOfRangeException IE)
{
Console.WriteLine(" Index out of range:" +
IE .Message.ToString());
}
最后
{
}
}
 
            communicator = new CommunicatorAPI.Messenger(); 
            IMessengerContactAdvanced a_contact = (IMessengerContactAdvanced)communicator.GetContact("theemail@someplace.com", communicator.MyServiceId); 
 
            object[] mpp = new object[11]; 
 
            if (a_contact != null
            { 
                try 
                { 
                    mpp[(int)PRESENCE_PROPERTY.PRESENCE_PROP_PRESENCE_NOTE] = "test from API"
                    a_contact.PresenceProperties = (object)mpp; 
 
                } 
                catch (COMException ce) 
                { 
                    Console.WriteLine("COM Exception: " + 
                                       ce.ErrorCode.ToString()); 
                } 
                catch (ArgumentException AE) 
                { 
                    Console.WriteLine("Argument Exception:" + 
                                       AE.Message.ToString().Trim()); 
                } 
                catch (IndexOutOfRangeException IE) 
                { 
                    Console.WriteLine("Index out of range: " + 
                                       IE.Message.ToString()); 
                } 
                finally 
                { 
 
                } 
            } 

推荐答案

不支持使用OC automation API设置在线记事。您可以使用UCC API,UCMA V2.0 API或CWA AJAX API进行设置。


Setting the presence note using the OC automation API is not supported.  You can set it using the UCC API, the UCMA V2.0 API or the CWA AJAX API.



这篇关于设置:PRESENCE_PROPERTY.PRESENCE_PROP_PRESENCE_NOTE时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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