Note:You also need to know about STA and MTA Thread pool.
- Open Menu->Type "C:\Program Files\Messenger" in Run.
- msmsgs.exe is our target to convert it to .Net assembly.
- Goto MS visual studio 2005 tools->open Visula studio 2005 Command prompt.
- type following command
Select Converted Dll from Add refernence window.
Now Switch to code view and this code.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using inetpubdotnetmsgr;
public partial class Messenger : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack==false)
{
MsgrObjectClass _messngerobject = new MsgrObjectClass();
_messngerobject.Logoff();
//IMsgrService _ImessngerService = _messngerobject.IMsgrObject_Services.PrimaryService;
_messngerobject.Logon("myuserid@hotmail.com", "mypassword", _messngerobject.Services.PrimaryService);
IMsgrUsers _Users = _messngerobject.get_List(MLIST.MLIST_CONTACT);
foreach (IMsgrUser _user in _Users)
{
ListBox1.Items.Add(_user.EmailAddress.ToString());
}
}
}
}
You aslo need to set permission on new generated Dll for asp.net User.
Does it work for other messengers too????........My office have their own messenger......I am working over a project on it.........
ReplyDeleteHi
ReplyDeleteIs it possible to integrate msn video conference with my asp.net page using this method ????
Thanks
@r4revolution , you can implement this method for every unmanaged dll developed outside .net framework.you have take care of MTA and STA thread pool as asp.net is Mulitthreaded.
ReplyDelete@Testing no you should not use this methid for msn video conference.
Hi Zanab
ReplyDeleteCould you please tell me how can I integrate msn video conference in my asp.net web page
Thanks
Abins