Newsgroup: it.comp.lang.delphi
Titolo: import ocx

ciao, 
ho un ocx scritto in VB e funzionante su un progetto VB, in delphi non
riesco a importarlo (come icona) e comunque eseguendo COMPONENT->IMPORT
ACTIVEX->ADD ottengo il seguente wrapper. Il problema č che l'ocx non č
una classe ma un interface, come faccio a richiamre i suoi metodi?
grazie
giuseppe
unit DDInterfaceEngine_TLB;
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked
pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface
uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL,
Variants;
 
const
  // TypeLibrary Major and minor versions
  DDInterfaceEngineMajorVersion = 1;
  DDInterfaceEngineMinorVersion = 0;
  LIBID_DDInterfaceEngine: TGUID =
'{84141B87-440F-4682-9762-637D164EF8C5}';
  IID__DDIEngine: TGUID = '{D0195404-2C46-4820-8272-9E8889CE6D75}';
  DIID___DDIEngine: TGUID = '{AE9B06C6-E029-4382-B510-C1C20B6DD126}';
  CLASS_DDIEngine: TGUID = '{B3527CF7-D87E-492A-81B9-260C40990796}';
type
  _DDIEngine = interface;
  _DDIEngineDisp = dispinterface;
  __DDIEngine = dispinterface;
  DDIEngine = _DDIEngine;
  _DDIEngine = interface(IDispatch)
    ['{D0195404-2C46-4820-8272-9E8889CE6D75}']
    procedure GhostMethod__DDIEngine_1940_479; safecall;
    procedure GhostMethod__DDIEngine_1944_480; safecall;
    procedure GhostMethod__DDIEngine_1948_481; safecall;
    procedure GhostMethod__DDIEngine_1952_482; safecall;
    function StartEngine: WordBool; safecall;
    procedure CloseEngine; safecall;
    function WriteToEngine(const strWrite: WideString): Integer; safecall;
    function Get_PathEngine: OleVariant; safecall;
    procedure Set_PathEngine(Param1: OleVariant); safecall;
    function Get_TimePolling: OleVariant; safecall;
    procedure Set_TimePolling(Param1: OleVariant); safecall;
    function Get_EngineStarted: OleVariant; safecall;
    function Get_Tag: OleVariant; safecall;
    procedure Set_Tag(Param1: OleVariant); safecall;
    property PathEngine: OleVariant read Get_PathEngine write
Set_PathEngine;
    property TimePolling: OleVariant read Get_TimePolling write
Set_TimePolling;
    property EngineStarted: OleVariant read Get_EngineStarted;
    property Tag: OleVariant read Get_Tag write Set_Tag;
  end;
  _DDIEngineDisp = dispinterface
    ['{D0195404-2C46-4820-8272-9E8889CE6D75}']
    procedure GhostMethod__DDIEngine_28_1; dispid 1610743808;
    procedure GhostMethod__DDIEngine_1944_480; dispid 1610744287;
    procedure GhostMethod__DDIEngine_1948_481; dispid 1610744288;
    procedure GhostMethod__DDIEngine_1952_482; dispid 1610744289;
    function StartEngine: WordBool; dispid 1610809348;
    procedure CloseEngine; dispid 1610809349;
    function WriteToEngine(const strWrite: WideString): Integer; dispid
1610809350;
    property PathEngine: OleVariant dispid 1745027075;
    property TimePolling: OleVariant dispid 1745027074;
    property EngineStarted: OleVariant readonly dispid 1745027073;
    property Tag: OleVariant dispid 1745027072;
  end;
  __DDIEngine = dispinterface
    ['{AE9B06C6-E029-4382-B510-C1C20B6DD126}']
    procedure DataFromEngine(const strRead: WideString); dispid 1;
  end;
implementation
uses ComObj;
end.
-- 
questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news
 segnala gli abusi ad 
ab...@newsland.it

 ACTIVEX->ADD ottengo il seguente wrapper. Il problema è che l'ocx non è
