[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Messenger API and Delphi

Posted on 2008-11-14
4
Medium Priority
?
1,583 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:alpires
  • 2
4 Comments
 
LVL 27

Expert Comment

by:BigRat
ID: 22960861
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
 
LVL 27

Expert Comment

by:BigRat
ID: 22960880
You can also pick up a lot of course code at torry.ru under Components/Communication/Mapi
0
 

Author Comment

by:alpires
ID: 22960961
Bigrat, "Messenger API type Library" is api Windows Messenger
0
 
LVL 16

Accepted Solution

by:
CodedK earned 2000 total points
ID: 22965120
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

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question