Messenger API and Delphi

Hi Experts,

I did the import of Messenger API type Library and I would like to know if there is any way to send and receive messages to a contact through this api, if yes, please some source code.

I am using delphi 7

Thx
alpiresAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BigRatCommented:
The old MAPI interface????

Sending Mail for example : http://www.delphifaq.com/faq/delphi/network/f236.shtml

Or the Exchange interface?

http://www.imibo.com/imidev/delphi/les/index.html

0
BigRatCommented:
You can also pick up a lot of course code at torry.ru under Components/Communication/Mapi
0
alpiresAuthor Commented:
Bigrat, "Messenger API type Library" is api Windows Messenger
0
CodedKSenior Software EngineerCommented:
Hi Alpires.

+ Some nice component : http://www.imcomponents.com/ivc.htm
+ SourceForge Project : http://sourceforge.net/projects/activemsn/

+ Some code...
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
var
Msg:IMessenger3;
....

Procedure Form1.OnCreate...
  Msg:=MessengerAPI_TLB.CoMessenger.Create;
....

Procedure MsgContact(Message_Str:String; Email:String);
var
Contacts:IMessengerContactsDisp;
Contact:IMessengerContactDisp;
MsgWND:IMessengerConversationWndDisp;
ww:HWND;
i,n,q:Integer;
begin
  Contacts:=IMessengerContactsDisp(Msg.MyContacts);
  i:=Contacts.Count;
  n:=0;
  while n < i do
  begin
  Contact:=IMessengerContactDisp(Contacts.Item(n));
  if Contact.SigninName = Email then
  begin
  MsgWnd:=IMessengerConversationWndDisp(Msg.InstantMessage(Msg.GetContact(Contact.SigninName,Contact.ServiceId)));
  ww:=FindWindowEx(msgwnd.HWND,0,'DirectUIHWND',nil);
  for q:=0 to Length(s) do SendMessage(ww, WM_CHAR ,Word(Message_Str[q]),0);
  PostMessage(ww, WM_KEYDOWN, VK_RETURN, 0);
  PostMessage(ww, WM_KEYUP, VK_RETURN, 0);
 
  //Optional ---------------------
  MsgWnd.Close;  {Close Window After Sending Message}
  //-------------------------------
  end;
  inc(n)
  end;
end;
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Author : Kuroi Saru


Hope this helps.
CodedK
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.