AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Tobit DvISE Programmierung

Ein Thema von DelphiPeter · begonnen am 6. Apr 2008 · letzter Beitrag vom 7. Apr 2008
 
Benutzerbild von sx2008
sx2008

Registriert seit: 15. Feb 2008
Ort: Baden-Württemberg
2.332 Beiträge
 
Delphi 2007 Professional
 
#8

Re: Brauche dringend Hilfe zu Tobit DvISE Programmierung

  Alt 7. Apr 2008, 00:04
Ich habe jetzt mit dem Namen "FaxItems" in der TLB.pas gesucht.
Man findest, dass dieses Property ein Inteface namens "MessageItems" zurückliefert.
Delphi-Quellcode:
  MessageItems = interface(IDispatch)
    ['{2A2E9B58-B2F9-49DA-B302-DC0402376CEB}']
    function Item(vIndex: OleVariant): MessageItem; safecall; // <==
    function Get__NewEnum: IUnknown; safecall;
    function Get_Count: Integer; safecall;
    function Get_Parent: IDispatch; safecall;
    function Get_Account: Account; safecall;
    property _NewEnum: IUnknown read Get__NewEnum;
    property Count: Integer read Get_Count;
    property Parent: IDispatch read Get_Parent;
    property Account: Account read Get_Account;
  end;
Es wird also ein Objekt "MessageItem" aus der Liste geliefert.
Es wird aber auch das Interface "FaxItem" untersützt:
Delphi-Quellcode:
  FaxItem = interface(MessageItem)
    ['{20F310C8-AD57-4F8C-AE04-15233E09F95B}']
    function Get_To_: WideString; safecall;
    function Get_PageCount: Integer; safecall;
    function Get_Image: OleVariant; safecall;
    function Get_Fields: IDispatch; safecall;
    procedure Copy(const pArchive: Archive); safecall;
    procedure Move(const pArchive: Archive); safecall;
    property To_: WideString read Get_To_;
    property PageCount: Integer read Get_PageCount;
    property Image: OleVariant read Get_Image;
    property Fields: IDispatch read Get_Fields; // <==
  end;
Und dort finden wir auch das Property "Fields". Es hat den Typ IDispatch, kann aber auch in folgendes Interface verwandelt werden:
Delphi-Quellcode:
  Fields = interface(IDispatch)
    ['{2B059336-EE52-4273-B79A-6FC1AE82A896}']
    function Item(vIndex: OleVariant): Field; safecall;
    function Get__NewEnum: IUnknown; safecall;
    function Get_Count: Integer; safecall;
    function Get_Parent: IDispatch; safecall;
    function Get_Account: Account; safecall;
    function GetText(ID: Integer): WideString; safecall;
    function Get_UserFields: IUserFields; safecall;
    property _NewEnum: IUnknown read Get__NewEnum;
    property Count: Integer read Get_Count;
    property Parent: IDispatch read Get_Parent;
    property Account: Account read Get_Account;
    property UserFields: IUserFields read Get_UserFields;
  end;
Damit sähe dein Code so aus:
Delphi-Quellcode:
var
   felder : Fields;
begin
...
for m := 0 to oMessageItems.Count-1 do begin
   oFaxItem := oMessageItems.Item(m) as FaxItem;

   felder := oFaxItem.Fields as Fields;

   AbsenderFax := felder.Item('SRFROM');
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:15 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz