What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » How To Call The MSN API using VB

Pages: (2): « First [ 1 ] 2 » Last »
How To Call The MSN API using VB
Author: Message:
TheCodeSmith
Junior Member
**


Posts: 15
Joined: Jul 2004
O.P. How To Call The MSN API using VB
Right, i've tried to set this up plenty of times in the past but now i always have problems.

I know it's possible to access the MSN api library directly from VB6 code, to change status/nick etc.

I have code from years ago that was compatible with <MSN6 versions, but nothing compatible with 6.2.

Could someone be so kind to post directions on how to include this in a VB project? I'll use VB.Net if i need to.

Thanks in advance.
~ TheCodeSmith
07-11-2004 01:54 AM
Profile E-Mail PM Find Quote Report
dotNorma
Veteran Member
*****

Avatar

Posts: 1745
Reputation: 17
33 / Male / –
Joined: May 2003
RE: How To Call The MSN API using VB
Erm.......

Go to Project > References > Messenger API Type Library

code:
Private WithEvents MSN As Messenger
Private Sub Form_Load()
Set MSN = New Messenger
End Sub


Then you can do stuff like...

code:
msgbox MSN.MyFreindlyName


to test it.

This post was edited on 07-11-2004 at 01:59 AM by dotNorma.
07-11-2004 01:58 AM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: How To Call The MSN API using VB
quote:
Originally posted by NoName
Erm.......

Go to Project > References > Messenger API Type Library

code:
Private WithEvents MSN As Messenger
Private Sub Form_Load()
Set MSN = New Messenger
End Sub


Just remember tho, by doing this on Windows XP you are running Windows Messenger to use the api.
07-11-2004 01:59 AM
Profile E-Mail PM Find Quote Report
TheCodeSmith
Junior Member
**


Posts: 15
Joined: Jul 2004
O.P. RE: How To Call The MSN API using VB
quote:
Originally posted by NoName
Go to Project > References > Messenger API Type Library
That's where my problem lies, when i tick the item, i get an "Error in loading DLL" message. Thanks matty, i now realise this is because i've removed windows messenger (including directory) and i use MSN Messenger 6.2 instead, i never liked Windows Messenger, or understood the need for two identical chat programs that conflict against each other.

Is there a way to do this, but with MSN 6.2 API's instead?
07-11-2004 02:08 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: How To Call The MSN API using VB
quote:
Originally posted by TheCodeSmith
quote:
Originally posted by NoName
Go to Project > References > Messenger API Type Library
That's where my problem lies, when i tick the item, i get an "Error in loading DLL" message. Thanks matty, i now realise this is because i've removed windows messenger (including directory) and i use MSN Messenger 6.2 instead, i never liked Windows Messenger, or understood the need for two identical chat programs that conflict against each other.

Is there a way to do this, but with MSN 6.2 API's instead?
Look back at your other thread
http://shoutbox.menthix.net/showthread.php?tid=28...d=275694#pid275694

I posted a huge reply.

Cheers

[Edit]
As long as the O/S is Windows XP or higher then you need to use the Windows Messenger API. There is no way around it that I know. (Obviously there is tho because look at Patchou :)). But on other O/S you can use the 6.2 Api.

This post was edited on 07-11-2004 at 02:17 AM by matty.
07-11-2004 02:16 AM
Profile E-Mail PM Find Quote Report
TheCodeSmith
Junior Member
**


Posts: 15
Joined: Jul 2004
O.P. RE: How To Call The MSN API using VB
quote:
Originally posted by Matty.
As long as the O/S is Windows XP or higher then you need to use the Windows Messenger API. There is no way around it that I know. (Obviously there is tho because look at Patchou :)). But on other O/S you can use the 6.2 Api.
Thanks for helping me.

So if i were to use the Windows Messenger API (as i'm running XP) - people would have to be using Windows Messenger to get it working, right? So it would be incompatible with MSN 6.2?
07-11-2004 03:05 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: How To Call The MSN API using VB
In a sense yes, but on the other hand no. It wont be incompatible with MSN Messenger just some of the features of the API in Windows Messenger are not available so there could be problems that way. Stick to the code i put in the other thread and you will be fine.
07-11-2004 03:09 AM
Profile E-Mail PM Find Quote Report
Millenium_edition
Veteran Member
*****

Avatar

Posts: 1787
Reputation: 57
Joined: Apr 2003
RE: How To Call The MSN API using VB
Installing WM isn't the only solution. There are plenty of other solutions, but none of them is guaranteed to work.
07-11-2004 08:57 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: How To Call The MSN API using VB
[SMALL NOTE]
quote:
Originally posted by TheCodeSmith
two identical chat programs that conflict against each other.
Windows Messenger and MSN Messenger are not identical. There are things that MSN Messenger can do and Windows Messenger not, AND vice versa (more)! Also, they do not conflict with eachother; you can run them with no problem side by side.
Also: Disabling Windows Messenger in the wrong way and in the proper way
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-11-2004 09:52 AM
Profile PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: How To Call The MSN API using VB
quote:
Originally posted by NoName

Go to Project > References > Messenger API Type Library
code:
Private WithEvents MSN As Messenger
Private Sub Form_Load()
Set MSN = New Messenger
End Sub


But you shouldn't do that in a Plus! plugin as it can make Messenger crash.  You should used the Messenger object passed in Initalize
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
07-11-2004 11:23 AM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On