Messenger Add-in -> MSN Messenger API
I was surfing on the developer site of Windows Live . I saw the new (for me) MSN SDK. Lastly there was only activity sdk which is not real SDK.
The new Messenger Add-in SDK is included inside MSN Live messenger, althought the site says it is a seperate download.
Anyway to use it,
- Add the key to windows registry -> HKEY_CURRENT_USER\ Software\ Microsoft\ MSNMessenger\ AddInFeatureEnabled 1
- Create a class library project
- Add MessengerClient.dll which is located on the messenger installation directory
- Use the interface to create the addin, the code will guide you on how to do that
- The different part for the delivery is the assembly name. You need to change the assembly name to the namespace and class name.
- Run Msn messenger, in the options windows, addin tab add your dll file. That’s it.
public class AutoReply : IMessengerAddIn { MessengerClient m_messenger; void IMessengerAddIn.Initialize(MessengerClient messenger) { m_messenger = messenger; AddInProperties properties = m_messenger.AddInProperties; properties.Creator = "Can Erten"; properties.Description = "Test"; m_messenger.IncomingTextMessage += new EventHandler<IncomingTextMessageEventArgs> (m_messenger_IncomingTextMessage); } void m_messenger_IncomingTextMessage(object sender, IncomingTextMessageEventArgs e) { m_messenger.SendTextMessage("Unavailable..." + e.UserFrom.FriendlyName, e.UserFrom); if (m_messenger.LocalUser.Status != UserStatus.Online) { string message = m_messenger.LocalUser.PersonalStatusMessage; m_messenger.SendTextMessage("Unavailable..." + e.UserFrom.FriendlyName, e.UserFrom); } } }
As you can see it is very simple and well developed class library. Thanks to MSN team for being that clear.
Finally you might want to debug the addin. To do this in visual studio, attach to msn process, make breakpoints and here we go, just debug as normally you do ![]()
![]()



It seems no events are fired after I load the DLL in messenger.
Attaching to the process show that void IMessengerAddIn.Initialize(MessengerClient messenger) is run. The line
messenger.IncomingTextMessage += new EventHandler(messenger_IncomingTextMessage);
does not result in any events to be run in
void messenger_IncomingTextMessage(object sender, IncomingTextMessageEventArgs e)
Any pointers would be appreciated
I’m using Windows Live Messenger 8.0
i think u shud have a link for msn on here and it shud be free 2 go on !!!
What kind of links you want? I’ve already provided links to start on.
The events only fire when your status is not “Online”
i only wanted to login not all this lol
i am using msn messenger 8.1 and it don`t show tabs but when someone else logs in the same messenger it show tell me what to do………..
i coundnt find the class IMessengerAddIn. where is it
this class works fine, but it fails when I include registry calls (using Microsoft.Win32) or even read or write to the file system!
Do you know how to grant permissions in this class??
Thanks
Hi Ammar,
I wouldn’t doubt that it is because of the Windows Vista security improvements. If it is, there should be some other articles to disable the user account or to be granted for such privileges.
Sorry, I don’t have a precise answer, but hope this helps.
Thanks
thanks for the reply Can! I’m using XP SP3, and I googled for a solution for one day and I didn’t find anything yet!