Такая тема уже создана, но надеюсь, что в новой быстрее получу помощь..
Вообщем, не могу заставить компонент TICQClient подсоединится к серверу мирабилиса.
Фаерволл показывает, что запрос на авторизацию проходит (login.icq.com), а вот далее все замолкает..
Используя этот же компонент в обычном приложении, все коннектится на ура.
Вот код:
Code: Select all
unit dmtest_pluginImpl;
interface
uses DMPluginIntf, Classes, Dialogs, ICQClient;
const
  myPluginID = '{90A3E969-18B0-4B4F-9DE0-54F3DB0D9EBA}';
  myPluginName = 'Test Plug-in';
  myPluginVersion = '0.1.1.1';
  myPluginEmail = 'slava@westbyte.com';
  myPluginHomePage = 'http://www.westbyte.com/dm/';
  myPluginCopyRight = chr(169)+'2006 WestByte';
  myMinNeedAppVersion = '5.0.2';
  myPluginDescription = 'Test Plug-in for show how create plugins for DM';
  myPluginDescriptionRussian = 'Тестовый плагин для демонстрации как создавать плагины для DM. Является одновременно шаблоном для создания плагинов. Язык реализации Delphi 7.';
  
type
TSc = class(TThread)
  private
   
  protected
   icq:TICQClient;
   procedure Execute; override;
   procedure Reading(Sender: TObject; Msg, UIN: String);
end;
TDMTestPlugIn = class(TInterfacedObject, IDMPlugIn)
  private
    myIDmInterface: IDmInterface;
  protected
  public
    function getID: WideString; stdcall;
    //-----info
    function GetName: WideString; stdcall;
    function GetVersion: WideString; stdcall;
    function GetDescription(language: WideString): WideString; stdcall;
    function GetEmail: WideString; stdcall;
    function GetHomepage: WideString; stdcall;
    function GetCopyright: WideString; stdcall;
    function GetMinAppVersion: WideString; stdcall;
    //------
    procedure PluginInit(_IDmInterface: IDmInterface); stdcall;
    procedure PluginConfigure(params: WideString); stdcall;
    procedure BeforeUnload; stdcall;
    function EventRaised(eventType: WideString; eventData: WideString): WideString; stdcall;
    { идентификатор плагина }
    property ID: WideString read getID;
  published
end;
var Sc: TSc;
implementation
procedure TSc.Execute;
begin
 icq:=TICQClient.Create(nil);
 icq.ICQServer:='login.icq.com';
 icq.ICQPort:=5190;
 icq.UIN:=****;
 icq.Password:='***';
 icq.Login;
 icq.OnMessageRecv:=Reading;
end;
procedure TSc.Reading(Sender: TObject; Msg, UIN: String);
begin
 ShowMessage(Msg);
end;
....
procedure TDMTestPlugIn.PluginInit(_IDmInterface: IDmInterface);
begin
  Sc:=TSc.Create(True);
  Sc.Execute();
  myIDmInterface := _IDmInterface;
end;
procedure TDMTestPlugIn.BeforeUnload;
begin
  Sc.icq.Free;
  Sc.Terminate;
  myIDmInterface := nil;
end;
//------------------------------------------------------------------------------
procedure TDMTestPlugIn.PluginConfigure(params: WideString);
begin
 // ShowMessage('Showing config form');
  //myIDmInterface.DoAction('AddingURL', '<url>http://www.westbyte.com/plugin</url> <sectionslimit>2</sectionslimit>');
//  ShowMessage(myIDmInterface.DoAction('GetDownloadIDsList', '3'));
end;
...
...
end.Dmaster: 5.2.3.1061
С уважением.
