# VBForums CodeBank > CodeBank - Visual Basic 6 and earlier >  Badger Messenger, an MSN clone that uses the MSN Network.

## Wokawidget

*IMPORTANT: (updated 25 Feb 2010) In the last few months Microsoft have stopped the MSN network using the MSNP9 protocol. This means the following project does NOT work since it replies on this protocol. See posts 118 to 120 in this thread as to why this doesn't work in more depth. I will be looking at writing a newer .NET version using the latest protocol later this year.*

Ok, here it is.
Still rough, but it's good enough to put up here now.

This is the source code to a version of MSN messenger I have written.

The original source code I got this from was posted here a week or so ago by alkatran. The link for this thread is here:

http://www.vbforums.com/showthread.php?t=323108

Cheers, for posting your code, not many do, more should  :Thumb:  


Badger Messenger so far doesn't actually do much.

You can log into your MSN account, see your contacts, change your status, add and delete groups. You can sort contacts numerous ways too. That's it.
There's a lot more coded into the DLL, I just haven't added the functionality in the UI yet.

Conversations don't work yet. I had them working but refractured the code and haven't got round to putting it in. The old code is just remarked out.


SOme of the features include:
Set initial status before loginAdd GroupDelete GroupRename GroupSet Contacts Nickname (different to their displayname. The nick name is a name you can give them and see them by)Set your displaynameSet your statusRemembers last login and settingsList contacts by email, nickname or displaynameSee which of your contacts DO NOT have you on their contacts list  :Big Grin: 

The MSNMessenger code is in a DLL, so you can refernece this in any of your apps and easily write your own UI for it.
You can even link it to your corporate DB and only allow certain emails to be registered as contacts, ie for a site engineer, the MSN network is great to chat to your mates but it's really for contacting ya boss back at the office.


Think that's it so far.

The site I got the MSN protocols from was quite handy:

http://www.hypothetic.org/docs/msn/n...le_session.php


Comments are most welcome.

Future revisions will be posted here frequently over the next week.

Just unzip the file, and then run Test.vpg

This code ain't for the faint hearted  :Wink: 


*A newer Version can be foound 2 posts down...the attachment on this post is the old version, but is left here for historical reasons*

*
Even newer post!
Updated 20th Sept 2005: See post #34
*
Woof

----------


## Wokawidget

2 screen shots. Quite basic.

----------


## Pc_Madness

Bad Woka bad! 

SetDisplayName hammers the msn server till it disconnects you.  :Stick Out Tongue: 

And you still haven't fixed the line in vbMSNMessenger.modMSPassport:GetPassPort()

mobjHttp.SetRequestHeader "Authorization", "Passport1.4 OrgVerb=GET,OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom,sign-in=" & pstrEmail & ",pwd=" & pstrPassword & "," & pstrProtocol

to allow the use of nonstandard characters.  :Stick Out Tongue:

----------


## Wokawidget

OK, here's the new version.

It has a few more features added.

Most of the above features have now bneen fully implemented in the UI.
Auto login feature, plus initial login status.

Change displayname and status.

Contacts in RED do NOT have you on their contact list  :Wink: 

Easily see who's on your banned and allowed list.

You can now initiate a chat, or receive a chat.

The code is a little buggy in some places, it's still only an alpha release, but it's comming along.

Need more testers and feedback.

Woof

----------


## theasker

:EEK!:   :Big Grin:   :big yellow:   VERY NICE! lolz, a good thing to add to this would be the ability to send files to your contacts, so if you have friends using msn 6 or 7 and u sign on usng this, you are still able to send and receive files from your contacts, please can you help me with this, i need help sending files accross msn 6, i want to set up a file server at home where when a message is received, it check it and if it is something then it will send that file to that person, how to send files over msn please

----------


## gunner

i cant get it to an exe from some reason  :Cry:

----------


## gunner

sorry for double post but..

Woka i did what you sayd but it says:


```
The Project 'DemoUi' can not be build because it references project '*my path*\vbMSNMessenger.vbp' That Has Not Been Build
```

  :Alien Frog:   :EEK!:   :Ehh:  

i dont understand why it doesnt work =\ im a vb newb kidda..

----------


## Wokawidget

Yes. You have to change the reference that it points to.
Toools...References....Now select vbMSNMessenger, but the DLL version. Remove the current vbMSNMessenger ref as this looks at the project.

Woka

----------


## gunner

i still cant get it...
so what your saying is that i have to remove the vbmsnmessenger reference?

 :wave:  Gunner

----------


## gunner

Hi,
when i send it to other persons it requiers dll's well woka said all ref things , so thats what i did. but he still cant run it

also im trying to change the status pictures but it doesnt work =\

----------


## Pc_Madness

You need to remove all the references, compile each of the projects in the project group and then add the references again.

If you want to give it to someone else then you'll need to get them to register the dll files, which can be done using an installer or, from Run the regsvr32 command, but I can't remember the syntax... I think its just 'regsvr32 Pathtodllgoeshere'....

And my understanding was that "display pictures" weren't support at the moment, its using the protocol before display pictures? And even then, he hasn't included support for it.

----------


## gunner

yes i know but what are the dll files i need to send to them?

and i mean status pictures: like away and busy and stuff like that.

----------


## RobCrombie

Hi Wokawidget,
As you know(from my postings), I like to keep things simple.
Thus I usually avoid VBG's and DLLs etc, so an idiot like me can compile and *distribute* very easily.

I recently was looking at a project which required a DLL. The author pointed out that we should not register his DLL. Instead we just ensure it is in the same path as the exe. Or if we like, we can place it in the Windows\System32 folder.
That sounded 'like a piece of cake' to me.

This question may expose my lack of  knowledge regarding DLLs, but could yours be made like that ?
Or are there apples and oranges with DLLs (different types, with different requirements) >

----------


## Wokawidget

The DLLs in my project definately require registering.

AxtiveX Usercontrols, OCX files, can be placed in the apps folder, or System32, and they will get registered automatically. Not sure about different DLLs though.
Mine DO require installing.

I have heard you mention keeping it simple before  :Big Grin: 

But what is even simpler is learning Inno setup and using that to install the app.
ALL vb apps require DLLs. Even a simple EXE requires 3 DLLs for the VB runtimes. Most PCs have these installed from other apps, and so your app works. But this will not always be the case.

What people fail to realise is that using an installer is JUST as important as any other process involved in your app. I have nevr quite understood why people are scared of them  :Confused: 

Woka

----------


## Pc_Madness

Generally a case a of hosting size restrictions and being on dial up is usually the reason for wanting to avoid Installers... espiceally when the program is a 50k exe and a 20k dll.  :Stick Out Tongue: 


Remind me to show you my blocking code, it works but when you log back in again it nolonger recieves the contacts display Name.  :Frown:

----------


## Arachnid13

hey, nice code, do you think you could make something that runs alongside msn7 and changes ur name at certain time interval... for example.. you could have your name, with a smiley bouncing left and right through ur name:

 :Smilie: Arachnid13
Ar :Smilie: achnid13
Arac :Smilie: hnid13
Arachni :Smilie: d13
Arachnid1 :Smilie: 3
Arachnid13 :Smilie: 
Arachnid1 :Smilie: 3
Arachni :Smilie: d13
Arac :Smilie: hnid13
Ar :Smilie: achnid13
 :Smilie: Arachnid13

i've been wanting to do this for ages and been trying to find code to do it but i havent been able to

----------


## Pc_Madness

You can only change your name so many times and then the server will block the command for a while.

----------


## Arachnid13

hmm, well i may just have to design my own chat network then!   :Wink:

----------


## asgsoft

it is very good i ihave to say, is there a way of making it get info from my site regesterants. so only people who are in my site can chat.

----------


## Wokawidget

Yup.
This is what I wrote it for....as a demo to my boss that we can use the MSN network for our engineers, but you can check your own local DB for permissions as well as having an MSN account.
In the frmMain you have the following function:

VB Code:
Public Sub SignIn(ByVal pblnAutoLogin As Boolean)
Dim strEmail    As String
Dim strPassword As String
Dim enmStatus   As vbBadgerMessenger.vbBadgerStatusConstants
Dim blnLogin    As Boolean
    If pblnAutoLogin Then
        strEmail = GetSysSetting(SECTION_LOGIN, SETTING_LOGIN_EMAIL)
        strPassword = DecryptData(GetSysSetting(SECTION_LOGIN, SETTING_LOGIN_PASSWORD))
        enmStatus = ctlLoginStatus.Status
    End If
    If Len(strEmail) > 0 And Len(strPassword) > 0 Then
        blnLogin = True
    Else
        If GetLoginDetails(strEmail, strPassword, enmStatus) Then
            ctlLoginStatus.Status = enmStatus
            blnLogin = True
        End If
    End If
    If blnLogin Then
        If pblnAutoLogin Then
            SetSysSetting SECTION_LOGIN, SETTING_LOGIN_STATUS, ctlLoginStatus.Status
        End If
        Screen.MousePointer = vbHourglass
        mnuSignIn.Enabled = False
        cmdSignIn.Enabled = False
        mobjMSN.SignIn strEmail, strPassword, enmStatus
    End If
End Sub
The line of code that logs you in is:

VB Code:
mobjMSN.SignIn strEmail, strPassword, enmStatus
So, what you want is something like.

VB Code:
'rest of code from function
If CustomLogin() Then
   mobjMSN.SignIn strEmail, strPassword, enmStatus
End If
'rest of fucntion code
 Private Function CustomLogin() As Boolean
   'code to validate engineers login against your DB
End Function
You may want to open another username password form so they can enter their site details, but I wud just validate the email address to be fair, something like:

VB Code:
Private Function CustomLogin(ByVal pstrEmail As String) As Boolean
   'code to validate engineers login against your DB
End Function
What code here completely depends on your system, or how your uses are going to validate against your DB.
If the DB in on a local LAN, which is what it is in my case, then I can just use ADO to connect to the SQL DB, or access, and validate the email address.
If you are doing this via the web, ie the DB is on your web server, then there are a number of ways to do this. I would go for a WebService written in .NET, but this does require you to learn webservices and have a copy of .NET.
You could also use ADO again, and by specifying the IP of the server you may be able to connect to your remote DB. Klienma, an admin here, does this all the time so you may want to ask him about this.
The other method would be to use a INet control on the form. You then write a web page that handles an Email param. Then using JS and VBscript or PHP, whatever, you can take that param and validate it. Then all you need to do is write a response to the page of True, or False. Your Msnger client will then just look at the text of the web page to see if it's been valdiated or not.

Hope that points you in the right direction. If you have any questions then give me a shout.

Woka

----------


## asgsoft

OK i don't know how i can connect to sql db using vb how can i do it? i will be using a remote server will it be possible?

----------


## kleinma

connecting to a SQL Server using ADO is pretty simple, and just as simple connecting to a remote one as a local one.

this function will return an open connection to a SQL Server... replace the DBNAMEHERE,PASSWORDHERE, etc with your own values.

VB Code:
Public Function OpenCN() As ADODB.Connection
 On Error GoTo EH:
     Set OpenCN = New ADODB.Connection
    
    '*********************************************
    'SQL SERVER CONNECTION
    OpenCN.ConnectionString = "Provider=SQLOLEDB;Persist Security Info=false;User ID=USERIDHERE;pwd=PASSWORDHERE;Initial Catalog=DBNAMEHERE;Server=SERVERNAMEHERE;Database=DBNAMEHERE;Locale Identifier=1033;Connect Timeout=10;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"
    '*********************************************
    
    OpenCN.Open
    
    Exit Function
 EH:
    MsgBox "Error connecting to SQL Server.", vbCritical
    Set OpenCN = Nothing
End Function

----------


## Wokawidget

Cheers Klienma...where would you put an IP address in there?

Woof

----------


## kleinma

sorry, IP would be the server name... 

something like this



> "Provider=SQLOLEDB;Persist Security Info=false;User ID=kleinma;pwd=kleinmaspassword;Initial Catalog=kleinmasdb;Server=42.36.101.5;Database=kleinmasdb;Locale Identifier=1033;Connect Timeout=10;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"


standard port for SQL Server (2000) is 1433, the connection will use that by default. If the port is different you specify it like this

IP,PORT
like this



> "Provider=SQLOLEDB;Persist Security Info=false;User ID=kleinma;pwd=kleinmaspassword;Initial Catalog=kleinmasdb;Server=42.36.101.5,2433;Database=kleinmasdb;Locale Identifier=1033;Connect Timeout=10;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"

----------


## asgsoft

can this be used to connect to mysql?

----------


## kleinma

you could connect to mysql, but the connection string provided is for SQL Server only. Each type of DB server has its own set of information needed to connect.

check out this site: http://www.connectionstrings.com/

you can find connection string configurations to virtually any DB you can imagine

----------


## asgsoft

the link only does vb.net wile i am using vb6?

----------


## kleinma

a connection string is a connection string so even if its says its .net, thats because its showing you a connection using .net objects, but the actual string sent to the database is still the same

for example under MySQL ole db connection info, it shows
Provider=MySQLProv;Data Source=mydb;User Id=UserName;Password=asdasd;"

this would still be the same in VB6

----------


## RodCosta

hi woof, how can i help you with this vb clone to the msn network ?





> OK, here's the new version.
> 
> It has a few more features added.
> 
> Most of the above features have now bneen fully implemented in the UI.
> Auto login feature, plus initial login status.
> 
> Change displayname and status.
> 
> ...

----------


## Wokawidget

errrr...i am not sure. random feedback is always good;

woof

----------


## uniquegodwin

Can you give me some advice on how I can make a similar kind of thing for yahoo messenger using vb.net? If you have any plans of making it,I would Love to help  :Smilie:  doesnt matter even if its for msn..but,using .net.

----------


## Wokawidget

I have no idea what type of advice to give.
The main structure and implementation of a yahoo messenger would be very similar, just a different protocol.
I am currently writting badgermessenger.Net although it's quite a way off yet. Still playing with it.

If you find any info on the yahoo protocol then that would be great,

Woof

----------


## uniquegodwin

Oh sure,Ill be checking it out  :Smilie:  and ill ask you if I have doubts  :Smilie:

----------


## Wokawidget

OK. The new version is here.

I've had it for ages, and not posted it. Sorry  :Frown: 

Have been writting BadgerMessenger .NET and have switched to the new MSNP12 protocol, which MSN Messenger 7.5 uses.

I noticed some old bugs to do with payloads that my old app had, so I have just fixed them, and decided to post the newer version here.

Badger Messenger.NET will be forthcoming, but I don't know when.

If anyone has any MSNP12 code they would like to share then that would be great.

Woka

----------


## Wokawidget

Here are the screen shots of said new version:

----------


## RobDog888

You should update the first post to let members know that the updated version is in post #34 now.  :Big Grin: 

I bet your going to get allot of spam now too with your email in the SS's  :Frown: 

Hey, where am I?  :Frown:

----------


## ..:RUDI:..

> OK. The new version is here.
> 
> I've had it for ages, and not posted it. Sorry 
> 
> Have been writting BadgerMessenger .NET and have switched to the new MSNP12 protocol, which MSN Messenger 7.5 uses.
> 
> I noticed some old bugs to do with payloads that my old app had, so I have just fixed them, and decided to post the newer version here.
> 
> Badger Messenger.NET will be forthcoming, but I don't know when.
> ...


Is this project still going???   :Sick:  

And MSNP13 is now in use, with MSNM 8 (Which I of course, do have  :Smilie: )

----------


## Wokawidget

Yup. Sort of. Am writing Badger Messenger .NET that uses MSNP12.
When did they release 13?

Wof

----------


## ..:RUDI:..

Don't know for sure, but MSN Messenger 8 uses it  :Wink:

----------


## Wokawidget

Can you download a demo of this?
Is MSN 8 the one that includes Yahoo IM?
That protocol will be all over the shop.

Woka

----------


## Iron Skull

I love this thing  :Smilie: 

There is only one Prob...
I cant get it Compiled  :Frown: 
I want it compiled to use it on the PCs were i dont have Visual Basic on (Ive VBRUNTIME)
Can you compile it? Thx aleady  :Smilie: 

Robin

----------


## Wokawidget

What error do you get?
U need to compile each project on it's own 1st.
ie.
Compile vbAPITimer
Compile vbWinsock
Open Badger messenger dll vbp, reference these 2 DLLs you just created. 
Compile.

Make sense?

Woka

----------


## Iron Skull

Ill get the error User-defined Type not defined

----------


## si_the_geek

I would assume that you are getting that when compiling Badger messenger dll vbp.. have you created the 2 DLL's, and added them to the references of Badger messenger dll?

----------


## Iron Skull

Yea I did :/

----------


## si_the_geek

Ok, on which line does the error occur?

----------


## Iron Skull

Its not in a line :/
It just says: Complile error...
 User-defined Type not defined

----------


## si_the_geek

It should point to a particular line of code when it has that error, so that you can tell which UDT is not defined (if in fact it _is_ a UDT!).  Unfortunately I don't think there is much we can do unless we know what it has a problem with.

One other thing you can check is the References are ok, as a "Missing:" reference can cause errors like this.

----------


## Iron Skull

yea i see a lot of "Missing:"
Now i let them in the project and ill got this error:

----------


## si_the_geek

Ah, well you need to un-tick all of those "Missing" references, and re-add the proper ones (I would recommend one at a time so you don't forget any!).  You may need to use "Browse.." to select the files that the references come from.

I haven't actually seen that error message before, but I presume that it means you need to reference the compiled version, rather than the project file.

----------


## Iron Skull

I cant un-tick the one... "vbXPButton.vbp"...

----------


## si_the_geek

Can you add that project (VBP or compiled) to another project?  If so you can open this project file in Notepad, and copy the reference line from the project file that is having the problem (replacing the one that is already there).

----------


## Iron Skull

Can you tell me what the change from the file exacly?
(Did you manage to compile it your self maybe you have the same errors....)

----------


## dglienna

Did you unzip the project into one folder?  Woka likes to put things into separate folders, and then zip them.  You can try unzipping with winzip, instead of just copying the files.  I had that problem before.  It's easier to just copy the files, but if you type the location into Winzip, it will create a few folders.

----------


## Iron Skull

They are in folders...
I use WinRar  :Wink:

----------


## si_the_geek

This is the line that needs to be replaced:


> Object=*\A..\vbXPButton.vbp


..and you should replace it with the line containing "vbXPButton" from the new project file.

----------


## Iron Skull

I cant find "Object=*\A..\vbXPButton.vbp" in any file...
Isnt there another way :/

----------


## si_the_geek

The project file (.vbp) for the project where you cant remove "vbXPButton.vbp" should have a line containing "vbXPButton.vbp".  Whatever this line contains, it needs to be replaced by a valid version (if you have managed to remove "vbXPButton.vbp", you can just add the line from the other project).

If you can't work it out - upload the project file with the problem, and the project file that contains a valid reference.

----------


## Iron Skull

It Works  :Smilie: 
Thanks!

----------


## Montsubai

Can someone please post an executable file of this, I'm running on a Computer without Visual Basic, so can someone post an .exe file of this. Thank you  :Smilie:

----------


## Wokawidget

It's an exe and a number of DLLs, and I think they exceed the posting attachment limit size.

 :Frown:

----------


## Iron Skull

@Montsubai
Here it is  :Smilie: 
You've to put the dlls in the directory E:/badger
else it will not run...

@Wokawidget
Look i build some unusefull tools in it lol
I use it at school and i love it thx man  :Wink:

----------


## Wokawidget

winzip?

woka

----------


## mfurqan

hi woka, is it copyrighted ? i mean am i allowed to make modifications ?

----------


## Wokawidget

Yup, change away. Open source. Knock yaself out.
If you do anything cool to it and u want to help others then post the changes here.

Have fun.

Woka

----------


## Montsubai

I'm always getting the problem: Components "vbXPButton.ocx" or oen of its dependencies not correctly registered.....

How can I solve this problem? I want to use this program on a PC without Visual Basic

----------


## Wokawidget

My code uses the vbXPButtons.vbp project.
This needs to be compiled into vbXPButtons.OCX (User control)
Then you reference this OCX from the UI project, by adding by going project ---> Components

if you want to copy this to another PC you MUST copy all the DLLs it uses. ie vbBadgerMessenger.dll, vbAPITimer.dll, vbXPButtons.ocx.
Once copied to the target pc these DLLs need to be registered using regsvr32 "Path\filename.dll"

You can alternatively use a deployment and package app that creates a setup exe for you to use. Do a search on the web or this site.

Woka

----------


## Montsubai

When I try to register the component, it says:
"DllRegisterServer in "C:\Documents and Settings..." has failed, the retourned code is 0x8004005"

----------


## Wokawidget

which component?

Woka

----------


## Montsubai

The "vbXPButton.ocx" component.

----------


## Wokawidget

What OS you using?

Woka

----------


## Montsubai

Windows XP Professional
I opened cmd, type the regsvr32 "C :Big Grin: o..\vbXPButton.ocx" en get the errot

----------


## Wokawidget

Zip up the OCX and post it on here.

Woka

----------


## Montsubai

There you go.

----------


## Ixl2

> Windows XP Professional
> I opened cmd, type the regsvr32 "Co..\vbXPButton.ocx" en get the errot


hi

this is what i did to register it 


```
regsvr32 "F:\sip\Skype Api\vbXPButton\vbXPButton.ocx"
```

Im glad that this is open for modiying as im in the process of making a client that can connect to Skype and Gizmo i was going to add msn at a later date but did not fancy writing it from start  :Frown: , so if its ok by you maybe i can add the skype and gizmo protocols to badger msn??

If any one is intrested in helping me then pm me and we can get together make "The all in one client".

Thanks

----------


## Wokawidget

Go for it. Add what you want to the project  :Big Grin: 

As for the vbXPButton.ocx....errr...I am not sure. I copied the OCX to my C: drive then did:


```
regsvr32 "c:\vbxpbutton.ocx"
```

And it registered it.
I have no idea why yours won't register.
You do have admin permissions on that PC don't you?

Woka

----------


## Montsubai

> Go for it. Add what you want to the project 
> 
> As for the vbXPButton.ocx....errr...I am not sure. I copied the OCX to my C: drive then did:
> 
> 
> ```
> regsvr32 "c:\vbxpbutton.ocx"
> ```
> 
> ...


yeah, no Administrator rights on this. I think I'm just gonna use a Package and Delpoyment wizard

----------


## Wokawidget

If you are not an admin, then package and deployment will fail too since this simply does regsvr32 behind the scenes  :Frown: 

The security is set up on the PC so you cannot install stuff. This is deliberate.

Woka

----------


## jayshah

Hi,

I was wondering if anyone could help me. I have windows 98 so apparently I can't get the WinHTTP thing, and they are right. Is there a workaround for this, as every messenger I have come across uses this unavailable DLL.

Thanks in advance,

Jay Shah.

----------


## kuolong

Hi,
Your code is very helpful for me, thank you very much. ^__^
I have a question
If I still use MSN to login, or skip the login precess
can I get my msn friends friendlyname and signinname?
If it's okay, please show me how to do that.

thank you very much ^^
 :Big Grin:

----------


## Wokawidget

errr.this isn't possible.

WOka

----------


## muteblaster

hallo at olways .....  :wave:  

 bladder messenger is a beautiful msn clone ad i like it.......bu i hve a problem on compliling it.....if i start the project whith compilation the project work....but if i compiling a goup of the project to done the exe. the compiler give me this erro ......
fatal error C1083: Cannot open compiler generated file: 'C:\Documents and Settings\Woof\Desktop\PopUp Messages\vbAPITimer\Release\APITimer.OBJ': No such file or directory.........

 you have same idea about it?......

 theks in advenced at olways............

 :wave:

----------


## Wokawidget

ok. The folder:

'C:\Documents and Settings\Woof\Desktop

Doesn't exist on your PC, as my windows username is Woof, and yours will be something else.

After compiling the vbAPITimer project, open the BadgerMessenger project and remove references to vbAPITimer, then reference the DLL, and not the project, and recompile.

The messenger project is still looking for the APITimer on my PC, so just re-add the references.

Does that help.

Woka

----------


## muteblaster

:wave:  

 now i posted a smoll update i have resolved sam error of compiling.....now you recompiling the project and overwait the exe the progaram is done...... 
but i am unable to post the code is too much big is 450 kb zip 

 now i focus my attention on security to encrypt olways the message.......

 there is same possibility to post the source code superior 250 kb....... 

 thenks for your previous work Wokawidget .....

----------


## Wokawidget

hahaa. my code compiles fine  :Big Grin:  U just need to decouple the projects, and relink them.

If u encrypt the msg then non of your friends will be able to read it unless they are using your client, which would decrypt the msg.

How come your souyrce code is sooo much bigger than mine?

WOka

----------


## muteblaster

TOP SECRET MESSENGER IS DONE...
 but this is early the first version
i am not sure it work realy finaly.......
to encrypt  is necessary creetid key and the contact can recive the message have the same program and the same password.......
 for same security reason i hve not inntroduced the excange key ( msn protocol is not a monster of securuty )....in the future i writen an articol about the sicurity issu.........  have posted the new source code on p2pforum ( the italian power file sharing ).....

 i have same problem to creetid a good installer...the exe work in my pc but not in an over pc........

 here there is the source

http://www.p2pforum.it/forum/showthr...100#post761100 

 same have the ability to creetid a good pocket installer?......

 thenks in advenced at olways can help me.....

----------


## Wokawidget

I mentioned in the priovate message u need to include the dlls in your setup app.
You can copy the exe to as many pc's as you like, but it will not work, if the other dlls (other projects that BadgerMessenger uses) are not located on the pc also. u MUST include these in your install app.

Also, the issue of security and encrypting msgs etc, is dead easy. It's only a few extra lines of code, nothing too complicated or new. Can be added to my code in 5mins. This limits the use of the messenger, as you will only be able to talk to ppl uses exactly the same version as you.

WOka

----------


## stavrulezz

Hi I have compiled everything with success but when i run it on the another computer i get an error "ActiveX componet Can't create object"

Please Help me ;(

----------


## Wokawidget

This is basic VB6, if not any programming language, knowledge. U cannot just put the EXE on another machine. You also have to include ALL the dlls and ocx's and other components that is uses.

You know those things called installers. Well that's their job. They put the dlls in the right place and register them with the OS. You can register a dll on a machine using Start ---> Run ---> regsvr32 "c:\Woof.dll"

VB6 comes with a free one called Package And Deployment Wizard. Use that.

Woka

----------


## stavrulezz

I've Done That i have registered all dlls (vbAPITimer.dll , vbMSNMessenger.dll , vbWinsck.dll) still get same error

----------


## si_the_geek

Dont just register the DLL's you think you need, create a proper installation package (as there are other files that need to be installed too).

You need to use the Package And Deployment Wizard, or something similar.  See this FAQ thread for more details.

----------


## Wokawidget

The target PC also requires vb6 runtime dlls. Installers automatically add these dependancies in.
Also, I said you need to copy all DLL's and *OCX*s.
Basically everything you compile. Each project in VB6 you compile that come with badger messenger MUST be on the target PC, and they MUST be registered.

----------


## muteblaster

> Hi I have compiled everything with success but when i run it on the another computer i get an error "ActiveX componet Can't create object"
> 
> Please Help me ;(


 sorry top secret messenger do not work proerly....there is same bug....but now i am working in an over msn clone thery semple and no install......budger messenger is good but in the source code there are too much activix DLL can caused varius  error of compiling......probably woka have imported over project and have done activx DLL compatibility....i like to progamming with a pure code if there is same project can i like i rewtite the code in my project..........and i assure me the project have a lot of minor problem......  
 is olways a different metod of programming......

 naw i am working in smile and fonts and i have jast introduced varius level of cryptografic to became realy a top secret agent.........

 i post this source in 15 days i think.......

 :wave:

----------


## rory

> sorry top secret messenger do not work proerly....there is same bug....but now i am working in an over msn clone thery semple and no install......budger messenger is good but in the source code there are too much activix DLL can caused varius  error of compiling......  in olways pc.......
> 
>  naw i am working in smile and fonts and i have jast introduced varius level of cryptografic to became realy a top secret agent.........
> 
>  i post this source in 15 days i think.......


top secret   :Big Grin:

----------


## Wokawidget

For gods sake  :Frown: 

 :Big Grin: 

Badger messenger uses 1 ActiveX control, and about 3 DLLs, for which all the source code is supplied.

The error here is with you I am afraid  :Frown: 
For a project to use 4 dependancies is nothing at all, this is a very small amount.

If Badger Messenger requires 4 dependancies, then these 4 dependancies MUST be installed on the PC. What's so hard about that? It's how windows works.

Each of the dependancies MUST be registered using RegSvr32 on the target machine....an installer package does this for you.
Also, ANY application written in VB6 has exactly the same issue. The PC u want to run the EXE on MUST have the VB6 runtime dlls installed, other wise even an empty compiled project will fail to run....similarly any .NET app requires the .NET framework installed on a PC...nice 80Mb dependancy there.

An installer will also install these vb6 runtime dependancies. Have either of you looked at the package deployment wizard??? Or the Visual Studio installer (free download from MS)...I would suggest you take a peek at using an installer, learn how windows works, and try again.

Writting an app with no depandancies in VB6 is impossible...and if you include all the code in my dlls into one app that that would be extremely bad application design and coding, plus it would be one large exe.

Woka

----------


## muteblaster

:wave:  

  samuen wont to help me to increase smile and fonts....becouse i have encounterd same problem on this modifucation......

the people can wont to help me  replay this topic  or send me a privat message.....

 i put your name in the credit of the program......

 thenks.....  :wave:

----------


## adamlonsdale

Hello there, sorry for digging up the topic.

Just wondering if it would be possible to intergrate a couple of things into it.

1 - Make the Display name in the chat, instead of email address
2 - emoticons. you know like 

```
:) :( :| :'( :$ :p :D
```

 etc. 
3 - Coloured names and messages. Say when the program detects [c=1]Hello[/c] it will change it to Hello or whatever  :Smilie: 

Also i was thinking about a message filter or something... like when logging in it loads a text file, with a list of words in, when it detects one it replaces it with *s

----------


## Wokawidget

All of those are pretty easy to implement....if you know what you're doing.

For displayname use objContact.DisplayName instead of objContact.Email when displaying it chat window.

Emoticons can be done by using a rich textbox and then looking at the msg before displaying and converting :-) into a smiley.

Colored MSG's and names can be done exactly the same way as emoticons. Just use a rich textbox and modify it before adding to rish textbox.

Alas, I don't have the time, or any inclination of implementing these  :Frown:  I am currently trying to start work on a new .NET version of the Badger Messenger Framework....mind you, i've been saying that for years  :Big Grin:

----------


## adamlonsdale

Yeah, i got the Display Name thingy. And i thought about RTBs but i have no clue on how to check them. Ill make a thread in the VB Classic. 

Thanks  :Big Grin:

----------


## CrazyComputerMan

Hello Im new in here, Im actually looking for MSN Messenger that i could access in the college because i got 2 hour NOTHING to do...

Could anyone send me ZIP file with Visual Basic 6.0 Thanks.

----------


## CrazyComputerMan

Oh and I got sad filter called Websense...

It blocks...
Ebuddy
MSN Web Messenger
and other MSN i know  :Frown:

----------


## Wokawidget

You will not find the source code for MSN Messenger, and it wasn't witten in VB6 I am afraid.

Woka

----------


## Wokawidget

> Oh and I got sad filter called Websense...
> 
> It blocks...
> Ebuddy
> MSN Web Messenger
> and other MSN i know


Probably because it blocks the ports...so even having the source code wouldn't help you.
The closest you will get is apps like badger messenger, that use the MSNP protocols, that's what MSN Messenger uses anyways.

You can also download a messenger sdk I believe, which is similar to my dll...I think.

Woka

----------


## halo2pac

I am new to these forums but I am not new to VB.
I'm creating a Dedicated server Bot for a game called C&C Renegade, and I would like to include your DLL's in my project.
This would enable me to page commands from a cell phone that has msn to my server.

if this is fine with you guys, I would like to know the Method to call the dlls

by calling the dlls i mean something like this:
[code]
Private Declare Function Init Lib "FDSTalk.dll" (ByVal port As Long, ByVal password As String) As Boolean
[/code

----------


## Wokawidget

Well the APIs can be seen in the Badgermessenger dll.
And the demo project shows these being used in the standard way, ie:

Dim obj As New MessengerObject
obj.SomeFunction(data1, data2)

It's been a good while since I have done any VB, but I am not sure if you can create API declarations like that to VB6 assemblies like you have in your post.
Correct me if I am wrong on this...memory a bit fuzzy.

Feel free to use the code though.

Cheers,

Woka

----------


## techgnome

The badger is correct.... the DLLs created by VB6 are ActiveX DLLs and must be registered on the system, and are accessed as objects. The only types of APIs that must be declared using Declare are calls to methods in _standard_ C-style DLLs... which do NOT need to be registered on the system.

-tg

----------


## jrdutra_@msn.com

> OK. The new version is here.
> 
> I've had it for ages, and not posted it. Sorry 
> 
> Have been writting BadgerMessenger .NET and have switched to the new MSNP12 protocol, which MSN Messenger 7.5 uses.
> 
> I noticed some old bugs to do with payloads that my old app had, so I have just fixed them, and decided to post the newer version here.
> 
> Badger Messenger.NET will be forthcoming, but I don't know when.
> ...


HEY GUY I'v downloaded it but I can not Export it as an EXE file.. It was a very grat JOG.. but I want this as an EXE to USE it... It's VERY LIGHT and fast!!!

SO.. did you correct some erros of it??
THanks

LOOK the ERROR



I don't know WHY.. I do not understand too much of VB just a few but...  can you helpme?

----------


## jrdutra_@msn.com

> What error do you get?
> U need to compile each project on it's own 1st.
> ie.
> Compile vbAPITimer
> Compile vbWinsock
> Open Badger messenger dll vbp, reference these 2 DLLs you just created. 
> Compile.
> 
> Make sense?
> ...


WHEN I try TO compiler VBApiTimer It's 
happens

What's can it be??

 :Frown:

----------


## Vaelis

Hi guys, I have to say Woka this is a nice piece of coding. Very tidy good job :Alien Frog:

----------


## fnixha

very nice woka this is a nice project  :Wink:

----------


## fnixha

can somebodu add those things:
--MSN popup messages
--emotions
--font style and color
--hyperlink detector
--number of contats online and offline
--display picture !!

i am saying this because i'am still learning visual basic but i dont understant english well so its dificle to understand all the codes :S:S 
so someone please update this messenger ... 
thnks for reading or updating!

sorry for my bad english

----------


## Wokawidget

lol  :Smilie: 
I don't think that's gonn happen.
There's a good few weeks worth of work there.
If you fancy looking into the protocols and how to add pictures and other exposed functionality then be my guest.

wooof

----------


## hugolainz

Hi ,
Very good code.
I tested it in the past and it was working, but now I cant get it to log in, it just waits for a timeout after login.

Any ideas ?

----------


## whatsup

yes hugolainz, the same here.
compiled on the first time, no error.
but try to login for too much time, with no success.
no stuck though, can easly be interrupt in the middle of the try connection.

----------


## whatsup

does anyone know how to just connect to msn account from the command line,
with some windows/dos/3party command ?

----------


## whatsup

so ?
is this badger can or can not login ?

----------


## mustiback

This project not work...

----------


## Wokawidget

Interesting...
The protocol does not send I reply back to the outgoing msg:

CVR 2 0x0409 win 4.10 i386 MSNMSGR 7.0.0425 MSMSGS MyEmail@Woka.com

It's almost like MS have disabled the older MSN protocol v9.

That sucks  :Frown: 

Woka

----------


## Nightwalker83

> Interesting...
> The protocol does not send I reply back to the outgoing msg:
> 
> CVR 2 0x0409 win 4.10 i386 MSNMSGR 7.0.0425 MSMSGS MyEmail@Woka.com
> 
> It's almost like MS have disabled the older MSN protocol v9.
> 
> That sucks 
> 
> Woka


Posts 5 and 6 here may offer some insight into the problem and a possible solution.

----------


## Wokawidget

Yes, that definately looks like the issue.
The 1st call to the MSN service works and a response is returned...the 2nd msg sent is the one i posted above. The MSN service simply does not reply to this...it should reply a NEW_VER msg or something if it worked as you would expect rather than not returning anything.

Hmmm...looks like I may have to revisit this app and write a new .NET version that uses the latest MSNP18 protocol.

Unhappy this project no longer works. I'll edit the main post.

Cheers,

Woka

----------


## whatsup

> Hmmm...looks like I may have to revisit this app and write a new .NET version that uses the latest MSNP18 protocol.
> 
> 
> Woka


why not using vb6 ?

----------


## Wokawidget

errrr...

1) VB6 can only be compiled in 32bit form
2) A lot of API is required for added functionality but in .NET this is wrapped up in nice simple objects
3) Visual Studio UI has limited functionality compared to any of the Visual Studios for .NET
4) .NET language is more powerful
5) Handling sockets, and other functionality, in .NET is MUCH easier
6) I haven't done any VB6 dev for a long long time...so I am rusty as I do c# mostly now
7) Err handling in .NET is far simpler and providers more info
8) .NET handles multithreading way better 
9) Inheritance is not an option in VB6

That's just a few, but there are a million more.
VB6 in it's day was a great great language...but it was limited. It bcame very complex to achieve what was essentially simple functionality, for example UI work.

VB.NET, or any of the other .NET dev languages, are simply far superior to VB6.
I can't see a reason why you would want to go backwards and dev in an old language.
You can download Visual Studio 2008 Express for free...so it's not as if people don't have the means to dev in .NET without spending a penny.


Cheers,

Woka
I love VB6 to bits and won't hear a bad word said about it...but .NET is just better in every way.

----------


## FidelCostra

Hi,can anyone attach here compiled workable version of this messenger? I don't know to compile, and in one attachment, is version which not work.Thank you.

----------


## Wokawidget

> Hi,can anyone attach here compiled workable version of this messenger? I don't know to compile, and in one attachment, is version which not work.Thank you.


Hi,

The source code is attached to this thread.
However....MS discontinued the MSN protocol a good few years back. By doing this it made this messenger source code obsolete overnight.

cheers,

Woika

----------

