1、直接调用MSN远程服务,Net开发环境下最出名的要算DotMSN开发库(开源)。 DotMSN是一款独立的开源类库,它不需要和官方的MSN Messenger交互,因此不必安装MSN Messenger就可以使用DotMSN和MSN Messenger服务通信.DotMSN是C#编写的,所以.NET环境支持的语言都能够使用.DotMSN类库使用简单而且实现方便。它灵活,坚固,轻量级利于整合到任何应用系统.使用DotMSN的应用系统能实现从创建消息机器人到自定义客户端等各种不同的功能.
如果你的应用程序需要和Messenger服务通信,DotMSN是一个不错的工具.
下面这张图可以使你了解DotMSN和你的应用程序之间的关系.

2、调用MSN的组件开发,主要功能来自引用MessengerClient.dll。下面是摘自一网友的文章。共同学习一下:







MSN8.0开放了一些接口,使得我们能很方便的再它限定的范围内进行插件开发操作.
开发环境:VS 2005 .NET 2.0 MSN 8.0
再MSN安装目录下有个MessengerClient.dll的文件,要建立插件就要引用这个东西
注册表 SoftWare\MicroSoft\MSNMessager下新建一个DWORD:AddInFeatureEnabled值为1 启用插件功能
新建一个工程,引用MessengerClient.dll,可以看到内部的一些构造有个IMessagerAddIN的通用接口,我们写插件就扩展这个接口,重写里面的函数void Initialize(Microsoft.Messenger.MessengerClient messenger).
里面的事件和方法不多,事件也就是收到消息,发送消息,状态改变事件,方法呢,就是发文字,发闪屏一些的,想来想去,MS给我们这个框架接口除了能让我们写机器人Robot聊天,还能干什么-_-#!!!
DLL里面操作限制也很严格,不能访问本地文件,不能用MemoryStream分配内存...,要想自己画个图,只能用GDI+画.....
本来想写个自动换头像插件的,结果发现接口没提供这个东西...,不过还是把一个最简单的Sample的例子放出来,依照这个架构扩展自己的插件就可以了









































再MSN菜单的工具->选项->加载项里面加载这个DLL,MSN对插件的文件名也有要求,那就是NAMESPACE+CLASS+DLL,也就是我这个DLL必须命民为:Red_angelX.MSNPlusIn.AutoChangeFace.dll才能正常试用,如果这些接口能实现什么有意思的功能而不是聊天机器人的话,那多令人兴奋-_-#