通过 Skype4COM.dll COM API 控制 Skype [英] Controlling Skype via its Skype4COM.dll COM API

查看:16
本文介绍了通过 Skype4COM.dll COM API 控制 Skype的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 C# 处理 Skype4COM.dll COM API,它运行良好对于我们需要的所有通信功能.我们正在尝试在嵌入到我们应用程序中的 Skype 之上放置一个更易于使用的界面.

I'm working with the Skype4COM.dll COM API using C# and it works very well for all of the communication functionality we need. We are trying to put an easier to use interface on top of Skype that is baked into our application.

我的麻烦在于控制或禁用哪些 Skype 窗口可以使用和不使用.我认为我需要的唯一 Skype 窗口是 Skype 视频电话/会议窗口.我想隐藏和控制 Skype 可以显示的所有其他窗口.我什至想禁用在来电时弹出的来电对话窗口,因为我们将呈现我们自己的应答提示.除了窗口管理之外,我对 API 很满意.

My trouble lies in controlling or disabling which Skype windows to use and not use. The only Skype window I believe I'll need is the Skype video phone/conference window. I would like to hide and control every other window that Skype can present. I would even like to disable the incoming call dialog window that pops up on incoming calls, since we'll be presenting our own answer prompt. I'm happy with the API except window management.

使用 API,我可以看到如何启用 Windows,但我似乎无法弄清楚如何隐藏它们,除非将 Windows 消息黑客入侵到 Skype 应用程序.我错过了什么吗?

With the API, I can see how to enable Windows, but I can't seem to figure out how to hide them, short of hacking a windows message to the Skype app. Am I missing something?

感谢您的帮助,肯尼

推荐答案

摸索了一下,我们发现您可以通过以下方式发送Skype 命令"

Poking around a bit we found that you can send 'Skype Commands' via

skypeobj.SendCommand ( Command cmd );

这对于我们需要的大部分内容都非常有效.这是 Skype 开发者网站上的参考资料:

That works pretty well for most of what we need. Here is a reference on the Skype developer site:

一些代码:

    void _SendSkypeCommand ( string cmdToSend )
    {
        Command cmdSkype = new Command ();
        cmdSkype.Blocking = true;
        cmdSkype.Timeout = 2000;
        cmdSkype.Command = cmdToSend;
        Trace.WriteLineIf ( _TracingDetailed, string.Format ( "skype command sent '{0}'", cmdToSend ) );
        _skype.SendCommand ( cmdSkype );
    }

    void _hideSkypeWindows ()
    {
        _SendSkypeCommand ( "SET SILENT_MODE ON" );
        _SendSkypeCommand ( "SET WINDOWSTATE HIDDEN" );
    }

这篇关于通过 Skype4COM.dll COM API 控制 Skype的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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