Click here to Skip to main content
15,884,986 members
Articles / Desktop Programming / Win32

dotNetMSN Library Fix

Rate me:
Please Sign up or sign in to vote.
3.67/5 (2 votes)
8 Aug 2008CPOL2 min read 27.8K   131   12   5
How to fix dotNetMSN library to easily connect to MSN service

Introduction

dotNetMSN(c) was a pretty simple to use library I found some time ago and it took me less than an hour to be familiar with it. I did many example integrations using dotnetmsn.dll on MSN(c) protocol connection and interaction with MSN protocol. But lately it seems the protocol changed in some way and some friends of mine using the library ask me why it is not working anymore.

I was about to check for the new version when I realized that there is no more project entry for dotNetMSN library; I found some other libraries for MSN protocol but this lightweight one captured my interest and I finally found in my backups the code to try fixing...

Background

As dotNetMSN is pretty old code, written by Mansour Behabadi (mansourbeh@yahoo.com) in 2004, the MSN version of the protocol used to write the tool was MSNP8. I'm sorry I did not have the time to check if the server ignores the MSNP8 request or simply violates it, but the issue was that the very first message, the VER, changed a little bit. Right now the CRV0 last field of VER response is not sent back anymore, so you simply need to fix this part of the code, to not wait/check this CVR0.

Using the Code

On netMSN.vb line 207, you have the following code:

VB.NET
Case "VER"
   If .Contains("MSNP8") And .Contains("CVR0") Then
      p_connector.SendCommand(...

Simply remove the checking for the CVR0 and that's it, everything will be smooth and will be working as before...

VB.NET
Case "VER"
      If .Contains("MSNP8") Then
         p_connector.SendCommand(... 

Compile the project and include the new DLL in your application code.

Points of Interest

It is of course a good exercise to use a network protocol analyzer to try to understand which part of the protocol changed and find that this minimal response makes your simple and perfect code stop working correctly. Re-engineering... nice idea, just need to put it in practice. :)

History

  • 8th August, 2008: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader BlueBit Technologies
Uruguay Uruguay
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generalspecial chars Pin
toredo13-Feb-09 6:34
toredo13-Feb-09 6:34 
GeneralRe: special chars Pin
BlueBit.uy6-May-09 16:08
BlueBit.uy6-May-09 16:08 
GeneralRe: special chars Pin
toredo7-May-09 11:28
toredo7-May-09 11:28 
GeneralThanks Pin
jzonthemtn22-Aug-08 5:22
jzonthemtn22-Aug-08 5:22 
AnswerRe: Thanks Pin
BlueBit.uy15-Sep-08 17:11
BlueBit.uy15-Sep-08 17:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.