Hello, I developed an application to the msn messenger in C # to monitor and control the company in msn. the problem is that after being updated for 2011 msn my application no longer works!
The event msn_OnIMWindowCreated no longer works ....

Can anyone help me? : |

have you checked the new API??

Hi!

The new Api, not exists OnIMWindowCreated event! :(

Check for any equivalent there must be some replacement

Have you tried for wrappers ?

if you have the API on MSN 2011 can you please share it so that some one can help you?

I can not find the corresponding event in the api. could you help me?

    private void msn_OnIMWindowDestroyed(object pIMWindow)
    {
        if (!globalStatus)
        {
            return;
        }

        if (!cfgSettings.LogConversations)
        {
            return;
        }

        try
        {
            //MessengerAPI.IMessengerConversationWnd imWindow = (MessengerAPI.IMessengerConversationWnd)pIMWindow;
            MessengerAPI.IMSNMessengerConversationWnd imWindow = (MessengerAPI.IMSNMessengerConversationWnd)pIMWindow;

            //MessengerAPI.IMessengerContacts contacts = (MessengerAPI.IMessengerContacts)imWindow.Contacts;
            MessengerAPI.IMSNMessengerContacts contacts = (MessengerAPI.IMSNMessengerContacts)imWindow.Contacts;

            string contactName = string.Empty;

            //foreach (MessengerAPI.IMessengerContact contact in contacts)
            foreach (MessengerAPI.IMSNMessengerContact contact in contacts)
            {
                contactName = contact.FriendlyName + ";";
            }

            if (imWindow.History != null)
            {
                string history = imWindow.History;

                SaveHistory(history, contactName, imWindow.HWND);
            }

            openedWindows.Remove(imWindow.HWND);
        }
        catch
        {
        }
        finally
        {
        }
    }

    private void msn_OnIMWindowCreated(object pIMWindow)
    {
        if (!globalStatus)
        {
            return;
        }

        if (!cfgSettings.LogConversations)
        {
            return;
        }

        try
        {
            //MessengerAPI.IMessengerConversationWnd imWindow = (MessengerAPI.IMessengerConversationWnd)pIMWindow;
            MessengerAPI.IMSNMessengerConversationWnd imWindow = (MessengerAPI.IMSNMessengerConversationWnd)pIMWindow;
            //MessengerAPI.IMessengerContacts contacts = (MessengerAPI.IMessengerContacts)imWindow.Contacts;
            MessengerAPI.IMSNMessengerContacts contacts = (MessengerAPI.IMSNMessengerContacts)imWindow.Contacts;

            string contactName = string.Empty;

            //foreach (MessengerAPI.IMessengerContact contact in contacts)
            foreach (MessengerAPI.IMSNMessengerContact contact in contacts)
            {
                contactName = contact.FriendlyName;
            }

            //if (contactName == "Oscar")
            //{
            //    imWindow.Close();
            //    MessageBox.Show("Contacto bloqueado!", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //}

            if (!openedWindows.ContainsKey(imWindow.HWND))
            {
                openedWindows.Add(imWindow.HWND, pIMWindow);
            }
        }
        catch
        {
        }
    }

    #endregion Conversations
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.