Results 1 to 17 of 17

Thread: Hey can ne1 work this out?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Location
    UK - Liverpool
    Posts
    113

    Arrow Hey can ne1 work this out?

    ONLY OPEN THE FILE USING A TEXT EDITOR

    Hey right i really need to know how to use these MSN API's or what ever they is. but i cant find info on them anywhere so i found this silly little program which can both send text and send a file.
    So i thought *maybe* if i open the file in a txt format then id be able to work a API out... but i was badly wrong heres some of the stuff i got which i thought may help....

    C:\Program Files\Messenger\msmsgs.exe dunno what thats got todo with it :\

    C:\WINDOWS\System32\scrrun.dll just thought id add all DLL's

    ¤FMsg_OnTextReceived

    advapi32.dll
    mVBA6.DLL
    MSVBVM60.DLL EVENT_SINK_GetIDsOfNames MethCallEngine EVENT_SINK_Invoke Zombie_GetTypeInfo EVENT_SINK_AddRef DllFunctionCall Zombie_GetTypeInfoCount EVENT_SINK_Release EVENT_SINK_QueryInterface __vbaExceptHandler ProcCallEngine

    Thats all i could find what i think might have somthing todo with it :\ also there was alot of "RegOpen", "RegClose" ....etc could that have anything todo with it?

    Thanx for reading
    Attached Files Attached Files
    Last edited by T0MMY; Sep 13th, 2001 at 01:13 PM.

  2. #2
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930

    Exclamation

    Can someone tell me why that just gives me a bad feeling? I'd advise everyone to just ignore whatever that thing is. I've never seen anything good come from such files...
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Location
    UK - Liverpool
    Posts
    113
    nooo the file is really ok but its abit of a pain but your ok if you dont open it as a EXE File as im sure you all know.

    im sorry i had to use this file i couldnt find another one which could both send a String and a File... but really its ok and if you did open it all i had todo was restart my computer and then deleted it but i promise its 100% safe

    but still if your a little unsure about "text files" then you dont have to download ive copy pasted everything i think has somthing todo wit the API im looking for
    please help
    thanx
    Last edited by T0MMY; Sep 13th, 2001 at 01:16 PM.

  4. #4
    AutoBot
    Guest

    Use The Protocol

    I am attaching the msn protocol, read it and you can figure out how to do whatever it is you wanna do. By the way what are you trying to do with msn and api calls?
    Attached Files Attached Files

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Location
    UK - Liverpool
    Posts
    113
    hey thanx i had ago playing with it a few days ago but looks abit above me but ill have another go.

    Well there a few things really first i was thinking about a kind of fileserver where users of my web site could Email me which file they want using there Hotmail address then i could check using a Email program and then send them the file they asked for. also all the other stuff like away bots and a bot which stores all my ACSII Art and what ever else i can come up with

  6. #6
    Junior Member
    Join Date
    Sep 2001
    Posts
    16
    dunno exactly what u want but...

    go to project/references
    tick the "Messenger Type Library"
    if its not there browse for the MSN executable... thats it
    u can see all the objects/methods/events/properties by hitting F2 (Object browser)

    i was mucking around with it and this worked... kinda

    Code:
        Dim msnTest As New MsgrObject
        Dim msnApp As IMessengerApp2
        
        Dim msnIMWindow As IMessengerIMWindow
        Dim msnSvc As IMsgrService
        Dim msnUsers As IMsgrUsers
        Dim msnUser As IMsgrUser
    
    Private Sub Form_Load()
        On Error Resume Next
        Set msnApp = CreateObject("Messenger.MessengerApp")
        
        'Check if logged on
        If msnTest.Services.PrimaryService.Status = MSS_NOT_LOGGED_ON Then
            msnTest.Logon "[email protected]", "(passwdhidden)", msnSvc
            Do While (msnTest.Services.PrimaryService.Status <> MSS_LOGGED_ON) Or (msnTest.UnreadEmail(msnInbox) = -1) Or (msnTest.LocalState = MSTATE_ONLINE)
                DoEvents
            Loop
        End If
        
        'Display info
        'Dunno why but if the program has to log msn on it always
        'exits the loop too early and reports the wrong info
        Debug.Print msnTest.LocalFriendlyName
        Debug.Print msnTest.Services.PrimaryService.FriendlyName
        Debug.Print msnTest.Services.PrimaryService.ServiceName
        If (msnTest.LocalState = MSTATE_AWAY) Then
            Debug.Print "IM AWAY"
        ElseIf (msnTest.LocalState = MSTATE_ONLINE) Then
            Debug.Print "IM ONLINE"
        End If
        Debug.Print msnTest.UnreadEmail(MFOLDER_INBOX)
    
        Set msnUsers = msnTest.List(MLIST_ALLOW)
        For Each msnUser In msnUsers
            Debug.Print msnUser.EmailAddress
            Debug.Print msnUser.FriendlyName
            Debug.Print msnUser.LogonName
            If (msnUser.State = MSTATE_ONLINE) Or (msnUser.State = MSTATE_AWAY) Then
                'Send online ppl an instant message
                'dunno why but getting an error message here
                'thus the on error resume next
                Set msnIMWindow = msnApp.LaunchIMUI(msnUser)
                msnIMWindow.SendText "HHHHEEEEELLLOOOOO BUUDDDYYYYY!!!!"
            End If
        Next
        
        
        'Sends that silly "xxxxx wants to talk to you" email
        msnTest.Services.PrimaryService.SendInviteMail "(hidden)@hotmail.com", 0, 0, 0
    End Sub
    if anyone gets it to work better ... tell me... i wanna know

  7. #7
    Junior Member
    Join Date
    Sep 2001
    Posts
    16
    hey i know its not related to vb... but does neone know where u can get a linux version of msn... i can find everything for linux but msn

    had given up hope .... but that msn-protocol spec gives me new hope

    i had thought ms must have been guarding their protocol as there was no alternatives from the client written by ms

  8. #8
    Fanatic Member Kings's Avatar
    Join Date
    Aug 2001
    Posts
    673

    DLL Error?

    I'm trying the MSN Messenger objects too
    but I keep getting a "DLL not found" error.
    I've re-installed MSN Messenger already, what's wrong???
    K i n g s

  9. #9
    AutoBot
    Guest

    Talking Look

    Look at the pic and make sure your including the proper reference to the project.
    Attached Images Attached Images  

  10. #10
    Fanatic Member Kings's Avatar
    Join Date
    Aug 2001
    Posts
    673

    Ok....

    Ok....done that

    Now the error changes in "Error in loading DLL"
    What the f**k does that supposed to mean?
    K i n g s

  11. #11
    AutoBot
    Guest

    Hummmm

    I'm running xp with windows messenger so it is hard for me to say why it is doing that, when you re-installed msn did you download the newest version and are you running messenger when you include it in your reference, thats what I did without mishap.

  12. #12
    AutoBot
    Guest

    Here is the code, I changed 2 things

    Add a command button named cmdSend and a textbox named
    txtMessage, I also reformatted the code because when I pasted
    it, the form loaded in as a module.




    Dim msnTest As New MsgrObject
    Dim msnApp As IMessengerApp2

    Dim msnIMWindow As IMessengerIMWindow
    Dim msnSvc As IMsgrService
    Dim msnUsers As IMsgrUsers
    Dim msnUser As IMsgrUser

    'Changed this to a command button instead of a form load event
    Private Sub cmdSend_Click()

    On Error Resume Next
    Set msnApp = CreateObject("Messenger.MessengerApp")

    'Check if logged on

    If msnTest.Services.PrimaryService.Status = MSS_NOT_LOGGED_ON Then

    msnTest.Logon "[email protected]", "(passwdhidden)", msnSvc

    Do While (msnTest.Services.PrimaryService.Status <> MSS_LOGGED_ON) Or (msnTest.UnreadEmail(msnInbox) = -1) Or (msnTest.LocalState = MSTATE_ONLINE)

    DoEvents

    Loop

    End If

    'Display info
    'Dunno why but if the program has to log msn on it always
    'exits the loop too early and reports the wrong info
    Debug.Print msnTest.LocalFriendlyName
    Debug.Print msnTest.Services.PrimaryService.FriendlyName
    Debug.Print msnTest.Services.PrimaryService.ServiceName

    If (msnTest.LocalState = MSTATE_AWAY) Then

    Debug.Print "IM AWAY"

    ElseIf (msnTest.LocalState = MSTATE_ONLINE) Then

    Debug.Print "IM ONLINE"

    End If

    Debug.Print msnTest.UnreadEmail(MFOLDER_INBOX)
    Set msnUsers = msnTest.List(MLIST_ALLOW)

    For Each msnUser In msnUsers

    Debug.Print msnUser.EmailAddress
    Debug.Print msnUser.FriendlyName
    Debug.Print msnUser.LogonName

    If (msnUser.State = MSTATE_ONLINE) Or (msnUser.State = MSTATE_AWAY) Then

    'Send online ppl an instant message
    'dunno why but getting an error message here
    'thus the on error resume next
    Set msnIMWindow = msnApp.LaunchIMUI(msnUser)
    'Changed this line to a textbox instead of a preset message
    msnIMWindow.SendText txtMessage.Text

    End If

    Next

    'Sends that silly "xxxxx wants to talk to you" email
    msnTest.Services.PrimaryService.SendInviteMail "(hidden)@hotmail.com", 0, 0, 0

    End Sub

  13. #13
    Fanatic Member Kings's Avatar
    Join Date
    Aug 2001
    Posts
    673

    THANKS!! autobot

    THANKS AUTOBOT!!!!
    you solved my "error in DLL Loading" problem
    with your code
    K i n g s

  14. #14
    Fanatic Member Kings's Avatar
    Join Date
    Aug 2001
    Posts
    673

    And another error....

    Heya folks

    have another error again with MSN Messenger file object
    Probably a very simple solution but I can't figure it out.

    The error that I keep getting is,
    Object variable or With block variable not set
    Anyone know the solution?
    K i n g s

  15. #15
    AutoBot
    Guest

    Alrighty

    Sorry been drinking tonight and hit the wrong button, look at my other post and you will see why I said that. It's not my code I just changed it a tiny bit, but thanks. Ok when vb gives you that error it should have a popup with the option Debug. Hit debug and vb should highlight the bit of code causing the error. Then hit stop and copy that line of code and post it here, maybe we can figure out why it is causing an error.

  16. #16
    Fanatic Member Kings's Avatar
    Join Date
    Aug 2001
    Posts
    673

    Code

    this code is causing that error to come

    txtMessage.Text = msnUser.State
    msnUser = IMsgrUser

    Anything wrong with that?

    Thanks
    K i n g s

  17. #17
    AutoBot
    Guest

    Talking Maybe

    Make sure you have the textbox named txtMessage

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width