.BeginSiginin之后的通用COM异常 [英] Generic COM Exception after .BeginSiginin
本文介绍了.BeginSiginin之后的通用COM异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在使用通常的通用代码,用户签署Lync,但它间歇性地抛出"通用COM异常"。代码是0x80EF0194"在< _lyncClient.EndSignIn(结果);下面的行。
I'm using the usual generic code to sign a user in to Lync, but it's intermittently throwing "Generic COM Exception. Code is 0x80EF0194" at the _lyncClient.EndSignIn(result); line below.
// Check if Lync is signed out
if (_lyncClient.State == ClientState.SignedOut)
{
_lyncClient.BeginSignIn(
address,
username,
password,
result =>
{
if (result.IsCompleted)
{
_lyncClient.EndSignIn(result);
}
else
{
MessageBox.Show(
"Nope, that didn't work. Check your credentials.",
"Title",
MessageBoxButton.OK,
MessageBoxImage.Error);
}
},
"Local user signing in" as object);
推荐答案
更多:
我改为单独的回调:
private void SignInCallback(IAsyncResult ar)
{
if (ar.IsCompleted == true)
{
try
{
_lyncClient.EndSignIn(ar);
}
catch (LyncClientException e)
{
MessageBox.Show("Error= " + e);
}
}
}
这篇关于.BeginSiginin之后的通用COM异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文