Autor Beitrag
EgonHugeist
Hält's aus hier
Beiträge: 11
Erhaltene Danke: 1



BeitragVerfasst: Sa 10.04.10 23:31 
Die alten TurboPower Componenten wieder erleben lassen
folgende funtion liest die WideStrings eines _ContactItem (IDispatch) über den Pointer und den dazugehörigen vTable-Offset aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
function THSEBaseData.ReadDispStrProp(Disp: Pointer; PropIdx: Cardinal): WideString;
begin
  asm
    mov eax, Result               // load and clear out prop
    call System.@WStrClr
    push eax                      // push prop onto stack.
    mov eax, Disp                 // Disp-Poiter auf eax speichern
    push eax                      // push interface pointer onto Stack
    mov eax, [eax]                // dereference vtable pointer
    add eax, PropIdx              // add vtable offset (ecx)
    call dword ptr [eax]          // call method
    call System.@CheckAutoResult  // use safecall error checker
  end
  ;
end;

nun möchte ich auch Daten des Typs WordBool, TOleEnum, TDateTime usw. auslesen können leider komm ich hier nicht weiter.. Die bereits von mir auf Delphi 2009/2010 umgestellte TOutlook und TContactsDataSet-Componenten funktionieren sonst super.

Der original-Code ist bei SourceForge zu finden. Kann mir hier irgendwer helfen?

Mfg

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 11.04.10 00:12 
Verwende bitte Delphi-Tags für deinen Code. Das macht die Geschichte wesentlich besser lesbar.

Ferner kann das begin\end entfallen, wenn man nur einen einzigen ASM-Block ohne weiteren Pascal-Code hat. Das vereinfcht zudem die Routine etwas. Zu beachten ist dabei aber, das sich ggf. ein paar Offsets\Register ändern, da Delphi da gern ein wenig umsortiert.

Von daher würde ich erstmal die Routine auf "Ohne Begin\End" umstellen und dann für die anderen Datentypen schauen. Wird i.d.R. nur ein Pointer mehr oder weniger sein.

P.S.: Bitte Links nicht vergessen, bzw. besser konkrete Abschnitte, wo es Probleme gibt.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
EgonHugeist Threadstarter
Hält's aus hier
Beiträge: 11
Erhaltene Danke: 1



BeitragVerfasst: So 11.04.10 12:29 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
  * The Original Code is TurboPower OfficePartner
  *
  * Code Changed for Delphi 2009 and 2010 by Michael Hiergeist
  * I Changed some Component Names to test the Sources and look how it works.
  * so i do'nt want to say
  * thiese components are completely developed by my own. I Changed some
  * procedures and add some usefull functions, i think. Enjoy

Hier die teilweise geänderten Typen:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
type
  TOpBaseDataClass = class of TOpBaseData;
{$M+}

  TOpBaseData = class
  private
    FPropCount: Integer;
    FPropList: PPropList;
    // asm Reading Operations
    function ReadDispStrProp(Disp: Pointer; PropIdx: Cardinal): WideString;

    // asm Writing Operations
    procedure WriteDispStrProp(Disp: Pointer; PropIdx: Cardinal;
      const PropVal: WideString);
  public
    constructor Create; virtual;
    destructor Destroy; override;
    procedure ReadPropertiesFromDisp(Disp: Pointer);
    procedure WritePropertiesToDisp(Disp: Pointer);
    class procedure CreateFieldDefsFromProps(FieldDefs: TFieldDefs);
  end;
{$M-}

  TOpInernalViewData = Class(TOpBaseData)
  private
    FCreationTime: TDateTime;
    FLastModificationTime: TDateTime;
    FMileage: WideString;
    FNoAging: WordBool;
    FEntryID: WideString;
    FSaved: WordBool;
    FSensitivity: OlSensitivity;
    FSize: Integer;
    FSubject: WideString;
    FUnRead: WordBool;
    FBusinessAddress: WideString;
    FCompanyAndFullName: WideString;
    FCompanyLastFirstNoSpace: WideString;
    FCompanyLastFirstSpaceOnly: WideString;
    FEmail1DisplayName: WideString;
    FEmail1EntryID: WideString;
    FEmail2DisplayName: WideString;
    FEmail2EntryID: WideString;
    FEmail3DisplayName: WideString;
    FEmail3EntryID: WideString;
    FFullName: WideString;
    FFullNameAndCompany: WideString;
    FHomeAddress: WideString;
    FJournal: WordBool;
    FLastFirstAndSuffix: WideString;
    FLastFirstNoSpace: WideString;
    FLastFirstNoSpaceCompany: WideString;
    FLastFirstSpaceOnly: WideString;
    FLastFirstSpaceOnlyCompany: WideString;
    FLastNameAndFirstName: WideString;
    FMailingAddress: WideString;
    FOtherAddress: WideString;
    FSelectedMailingAddress: OlMailingAddress;
  published
    property CreationTime: TDateTime index 16 read FCreationTime write FCreationTime;
    property EntryID: WideString index 17 read FEntryID write FEntryID;
    { offset 96 }
    property LastModificationTime: TDateTime index 22 read FLastModificationTime; //bringt Fehler
    property Mileage: WideString index 26 read FMileage write FMileage;
    property NoAging: WordBool index 28 read FNoAging write FNoAging;
    property Saved: WordBool index 32 read FSaved write FSaved;
    property Sensitivity
      : OlSensitivity index 33 read FSensitivity write FSensitivity;
    property Size: Integer index 35 read FSize write FSize;
    property Subject: WideString index 36 read FSubject write FSubject;
    property UnRead: WordBool index 38 read FUnRead write FUnRead;
    property BusinessAddress: WideString index 61 read FBusinessAddress write
      FBusinessAddress;
    property CompanyAndFullName
      : WideString index 87 read FCompanyAndFullName write FCompanyAndFullName;
    property CompanyLastFirstNoSpace
      : WideString index 88 read FCompanyLastFirstNoSpace write
      FCompanyLastFirstNoSpace;
    property CompanyLastFirstSpaceOnly
      : WideString index 89 read FCompanyLastFirstSpaceOnly write
      FCompanyLastFirstSpaceOnly;
    property Email1DisplayName
      : WideString index 104 read FEmail1DisplayName write FEmail1DisplayName;
    property Email1EntryID
      : WideString index 105 read FEmail1EntryID write FEmail1EntryID;
    property Email2DisplayName
      : WideString index 110 read FEmail2DisplayName write FEmail2DisplayName;
    property Email2EntryID
      : WideString index 111 read FEmail2EntryID write FEmail2EntryID;
    property Email3DisplayName
      : WideString index 116 read FEmail3DisplayName write FEmail3DisplayName;
    property Email3EntryID
      : WideString index 117 read FEmail3EntryID write FEmail3EntryID;
    property FullName: WideString index 124 read FFullName write FFullName;
    property FullNameAndCompany
      : WideString index 126 read FFullNameAndCompany write FFullNameAndCompany;
    property HomeAddress
      : WideString index 135 read FHomeAddress write FHomeAddress;
    property Journal: WordBool index 161 read FJournal write FJournal;
    property LastFirstAndSuffix
      : WideString index 165 read FLastFirstAndSuffix write FLastFirstAndSuffix;
    property LastFirstNoSpace
      : WideString index 166 read FLastFirstNoSpace write FLastFirstNoSpace;
    property LastFirstNoSpaceCompany
      : WideString index 167 read FLastFirstNoSpaceCompany write
      FLastFirstNoSpaceCompany;
    property LastFirstSpaceOnly
      : WideString index 168 read FLastFirstSpaceOnly write FLastFirstSpaceOnly;
    property LastFirstSpaceOnlyCompany
      : WideString index 169 read FLastFirstSpaceOnlyCompany write
      FLastFirstSpaceOnlyCompany;
    property LastNameAndFirstName
      : WideString index 172 read FLastNameAndFirstName write
      FLastNameAndFirstName;
    property MailingAddress
      : WideString index 173 read FMailingAddress write FMailingAddress;
    property OtherAddress
      : WideString index 203 read FOtherAddress write FOtherAddress;
    property SelectedMailingAddress
      : OlMailingAddress index 233 read FSelectedMailingAddress write
      FSelectedMailingAddress;
  end;

function TOpContactsDataSet.GetRecord(Buffer: TRecordBuffer;
  GetMode: TGetMode; DoCheck: Boolean): TGetResult;
var
  Item: _ContactItem;
  ItemDisp: IDispatch;
  List: TList;
  I: Integer;
begin
  Result := grOk;
  case GetMode of
    gmPrior:
      if FRecordPos <= 1 then
      begin
        FRecordPos := 1;
        Result := grBOF;
      end
      else
        Dec(FRecordPos);
    gmCurrent:
      if (FRecordPos = 0or (FRecordPos >= RecordCount) then
        Result := grError;
    gmNext:
      if FRecordPos > RecordCount - 1 then
        Result := grEOF
      else
        inc(FRecordPos);
  end;
  if Result = grOk then
  begin
    ItemDisp := FItems.Item(FRecordPos);
    if ItemDisp = nil then
      Result := grError
    else
    begin
      if ItemDisp.QueryInterface(_ContactItem, Item) <> S_OK then
      begin
        // Work around OL2000: Recurse if an unsupported interface is obtained
        Result := GetRecord(Buffer, GetMode, DoCheck);
        Exit;
      end;
      List := PContactRec(Buffer)^.Data;
      for I := 0 to List.Count - 1 do
      begin
        THSEBaseData(List[I]).ReadPropertiesFromDisp(Pointer(Item));
        PContactRec(Buffer)^.Row := Item;
        PContactRec(Buffer)^.Idx := FRecordPos;
        PContactRec(Buffer)^.BMFlag := bfCurrent;
      end;
     CreateEvents(Item, ItemEvents);
   end;
  end;
  if (Result = grError) and DoCheck then
    OfficeError(SFailFetch);
end;

class procedure TOpBaseData.CreateFieldDefsFromProps(FieldDefs: TFieldDefs);
var
  Cnt, I: Integer;
  PList: PPropList;
  Prop: PPropInfo;
begin
  Cnt := GetTypeData(ClassInfo)^.PropCount;
  if Cnt > 0 then
  begin
    GetMem(PList, Cnt * SizeOf(Pointer));
    try
      GetPropInfos(ClassInfo, PList);
      for I := 0 to Cnt - 1 do
      begin
        Prop := PList[I];
        with FieldDefs.AddFieldDef do
        begin
          DataType := TFieldType(Prop^.PropType^.Kind);
          name := String(Prop^.Name);
          if name = 'EntryID' then
            Attributes := [Db.faReadOnly { , db.faHiddenCol } ];
          case Prop^.PropType^.Kind of
            tkUString, tkString, tkLString, tkWString:
              begin
                DataType := ftString;
                Size := 128;
              end;
            tkFloat:
              case GetTypeData(Prop^.PropType^).FloatType of
                ftSingle, ftComp: DataType := ftFloat;
                ftExtended:       DataType := TFieldType(ftExtended);
                ftDouble:         DataType := ftDateTime;
                ftCurr:           DataType := ftCurrency;
              end;
            tkInteger:      DataType := ftInteger;
            tkEnumeration:  DataType := ftBoolean;
            tkRecord:       DataType := ftGUID;
          end;
          Required := False;
        end;
      end;
    finally
      FreeMem(PList);
    end;
  end;
end;

procedure TOpBaseData.ReadPropertiesFromDisp(Disp: Pointer);
var
  I: Integer;
  Prop: PPropInfo;
  wsPropVal: WideString;
  VtOffset: Integer;
  vDate: TDateTime;
  DynArray: Pointer;

begin
  //ReadPropertysFromDisp
  for I := 0 to FPropCount - 1 do
  begin
    Prop := FPropList[I];
    VtOffset := 28 + (Prop^.Index * 4);
    case Prop^.PropType^.Kind of
      tkChar, tkWChar:
        SetOrdProp(Self, Prop, 1);
      tkInteger:
        case Prop^.Index of
          20: SetOrdProp(Self, Prop, _ContactItem(Disp).Importance);
          33: SetOrdProp(Self, Prop, _ContactItem(Disp).Sensitivity);
          35: SetOrdProp(Self, Prop, _ContactItem(Disp).Size);
          127: SetOrdProp(Self, Prop, _ContactItem(Disp).Gender);
          233: SetOrdProp(Self, Prop, _ContactItem(Disp).SelectedMailingAddress);
        end;
      tkEnumeration:
        case Prop^.Index of
          28: SetOrdProp(Self, Prop, Ord(_ContactItem(Disp).NoAging));
          32: SetOrdProp(Self, Prop, Ord(_ContactItem(Disp).Saved));
          38: SetOrdProp(Self, Prop, Ord(_ContactItem(Disp).UnRead));
          161: SetOrdProp(Self, Prop, Ord(_ContactItem(Disp).Journal));
        end;
      tkSet: ;
{        if VarType(Value) = varInteger then
          SetOrdProp(Self, Prop, Value)
        else
          SetSetProp(Self, Prop, VarToStr(Value));  }

      tkFloat:
        case GetTypeData(Prop^.PropType^).FloatType of
          ftSingle, ftComp: ;
          ftExtended: ;
          ftDouble:
            begin
              case Prop^.Index of
                16: SetFloatProp(Self, Prop, _ContactItem(Disp).CreationTime);
                22: SetFloatProp(Self, Prop, _ContactItem(Disp).LastModificationTime); //Fehler Warum??????????
                51: SetFloatProp(Self, Prop, _ContactItem(Disp).Anniversary);
                57: SetFloatProp(Self, Prop, _ContactItem(Disp).Birthday);
              end;
            end;

          ftCurr: ;
        end;
      tkString, tkLString:
        SetStrProp(Self, Prop, ReadDispStrProp(Disp, VtOffset));
      tkWString:
        begin
          wsPropVal := ReadDispStrProp(Disp, VtOffset);
          SetWideStrProp(Self, Prop, wsPropVal);
        end;
      tkUString:
        SetUnicodeStrProp(Self, Prop, ReadDispStrProp(Disp, VtOffset)); //SB: ??
      tkVariant:
        SetVariantProp(Self, Prop, Variant(null));
      tkInt64:  ;
        //SetInt64Prop(Self, Prop, null);
      tkDynArray:
        begin
          DynArray := nil// "nil array"
          //DynArrayFromVariant(DynArray, Value, Prop^.PropType^);
          SetDynArrayProp(Self, Prop, DynArray);
        end;
    else
      raise EPropertyConvertError.CreateResFmt(@SInvalidPropertyType,
        [GetTypeName(Prop.PropType^)]);
    end;
  end;
end;

hier die lese und schreib funtionen:
function TOpBaseData.ReadDispStrProp(Disp: Pointer; PropIdx: Cardinal): WideString;
begin
  asm
    mov eax, Result               // load and clear out prop
    call System.@WStrClr
    push eax                      // push prop onto stack.
    mov eax, Disp                 // Disp-Poiter auf eax speichern
    push eax                      // push interface pointer onto Stack
    mov eax, [eax]                // dereference vtable pointer
    add eax, PropIdx              // add vtable offset (ecx)
    call dword ptr [eax]          // call method
    call System.@CheckAutoResult  // use safecall error checker
  end
  ;
end;

procedure TOpBaseData.WriteDispStrProp(Disp: Pointer; PropIdx: Cardinal;
  const PropVal: WideString);
begin
  asm
    mov eax, PropVal
    push eax                      // push property value
    mov eax, Disp
    push eax                      // push interface pointer
    mov eax, [eax]                // dereference vtable pointer
    add eax, PropIdx              // add vtable offset
    call dword ptr eax          // call method
    call System.@CheckAutoResult  // use safecall error checker
  end
  ;
end;

Wie geh ich mit Unicode/Wide-Strings um? Habe eine Fubktion geschrieben, welche den Speicher überschreibt, aber muß das sein? DBGrid zeigt mir sonst nur ersten Buchstaben an oder gar Chinesische Zeichen, beim ändern eines Datensatze....

Wie kann ich die oben aufgeführten anderen Daten-Typen über dan Dispatch-Pointer direkt aufrufen?

Wie handelt man null im DateTimeField? -> Fehler 0,0 ist kein gültiger Zeitstempel...

MFG EgonHugeist

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 11.04.10 14:42 
Zufällig für die Lese+Schreibfunktionen den tatsächlich vom Compiler erzeugten Code da? Inclusive Memory-Dumps?

Was mir aber auffällt ist, dass Du die aus der vTable gelesenen Pointer nicht auf Gültigkeit prüfst. Ist das Absicht? Mindestens ein IsNull sollte da mit hin IMHO.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
EgonHugeist Threadstarter
Hält's aus hier
Beiträge: 11
Erhaltene Danke: 1



BeitragVerfasst: So 11.04.10 15:33 
Hallo BenBE, erst mal danke fürs Interesse hier ausschnitte des CPU-Fensters ( ich hoffe du meinst dies.. )

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
procedure ReadPropertysFromDisp..

HSEDBOutlook.pas.2170: for I := 0 to FPropCount - 1 do
00545D7A 8B7704           mov esi,[edi+$04]
00545D7D 4E               dec esi
00545D7E 85F6             test esi,esi
00545D80 0F8CF4030000     jl $0054617a
00545D86 46               inc esi
00545D87 C745F400000000   mov [ebp-$0c],$00000000
HSEDBOutlook.pas.2172: Prop := FPropList[I];
00545D8E 8B4708           mov eax,[edi+$08]
00545D91 8B55F4           mov edx,[ebp-$0c]
00545D94 8B1C90           mov ebx,[eax+edx*4]
HSEDBOutlook.pas.2173: VtOffset := 28 + (Prop^.Index * 4);
00545D97 8B4310           mov eax,[ebx+$10]
00545D9A 8BD0             mov edx,eax
00545D9C 03D2             add edx,edx
00545D9E 03D2             add edx,edx
00545DA0 83C21C           add edx,$1c
00545DA3 8955F0           mov [ebp-$10],edx
HSEDBOutlook.pas.2174: case Prop^.PropType^.Kind of

00545DA6 8B13             mov edx,[ebx]
00545DA8 8B12             mov edx,[edx]
00545DAA 0FB612           movzx edx,[edx]
00545DAD 83FA12           cmp edx,$12
00545DB0 0F8787030000     jnbe $0054613d
00545DB6 FF2495BD5D5400   jmp dword ptr [edx*4+$545dbd]
00545DBD 3D6154001C       cmp eax,$1c005461
00545DC2 5E               pop esi
00545DC3 54               push esp
00545DC4 0009             add [ecx],cl
00545DC6 5E               pop esi
00545DC7 54               push esp
00545DC8 0000             add [eax],al
00545DCA 5F               pop edi
00545DCB 54               push esp
00545DCC 00B55F540098     add [ebp-$67ffaba1],dh
00545DD2 60               pushad 
00545DD3 54               push esp
00545DD4 007061           add [eax+$61],dh
00545DD7 54               push esp
00545DD8 003D6154003D     add [$3d005461],bh
00545DDE 61               popad 
00545DDF 54               push esp
00545DE0 0009             add [ecx],cl
00545DE2 5E               pop esi
00545DE3 54               push esp
00545DE4 0098605400CC     add [eax-$33ffaba0],bl
00545DEA 60               pushad 
00545DEB 54               push esp
00545DEC 0018             add [eax],bl
00545DEE 61               popad 
00545DEF 54               push esp
00545DF0 003D6154003D     add [$3d005461],bh
00545DF6 61               popad 
00545DF7 54               push esp
00545DF8 003D61540070     add [$70005461],bh
00545DFE 61               popad 
00545DFF 54               push esp
00545E00 002E             add [esi],ch
00545E02 61               popad 
00545E03 54               push esp
00545E04 00EE             add dh,ch
00545E06 60               pushad 
00545E07 54               push esp
00545E08 00B901000000     add [ecx+$00000001],bh
00545E0E 8BD3             mov edx,ebx
00545E10 8BC7             mov eax,edi
00545E12 E86556EEFF       call SetOrdProp
00545E17 E954030000       jmp $00546170
HSEDBOutlook.pas.2178: case Prop^.Index of
00545E1C 83F823           cmp eax,$23
00545E1F 7F11             jnle $00545e32
00545E21 746B             jz $00545e8e
00545E23 83E814           sub eax,$14
00545E26 741D             jz $00545e45
00545E28 83E80D           sub eax,$0d
00545E2B 743B             jz $00545e68
00545E2D E93E030000       jmp $00546170
00545E32 83E87F           sub eax,$7f
00545E35 747D             jz $00545eb4
00545E37 83E86A           sub eax,$6a
00545E3A 0F849A000000     jz $00545eda
00545E40 E92B030000       jmp $00546170
HSEDBOutlook.pas.2179: 20: SetOrdProp(Self, Prop, _ContactItem(Disp).Importance);
00545E45 8D45EC           lea eax,[ebp-$14]
00545E48 50               push eax
00545E49 8B45FC           mov eax,[ebp-$04]
00545E4C 50               push eax
00545E4D 8B00             mov eax,[eax]
00545E4F FF506C           call dword ptr [eax+$6c]
00545E52 E87D3EECFF       call @CheckAutoResult
00545E57 8B4DEC           mov ecx,[ebp-$14]
00545E5A 8BD3             mov edx,ebx
00545E5C 8BC7             mov eax,edi
00545E5E E81956EEFF       call SetOrdProp
00545E63 E908030000       jmp $00546170
HSEDBOutlook.pas.2180: 33: SetOrdProp(Self, Prop, _ContactItem(Disp).Sensitivity);
00545E68 8D45EC           lea eax,[ebp-$14]
00545E6B 50               push eax
00545E6C 8B45FC           mov eax,[ebp-$04]
00545E6F 50               push eax
00545E70 8B00             mov eax,[eax]
00545E72 FF90A0000000     call dword ptr [eax+$000000a0]
00545E78 E8573EECFF       call @CheckAutoResult
00545E7D 8B4DEC           mov ecx,[ebp-$14]
00545E80 8BD3             mov edx,ebx
00545E82 8BC7             mov eax,edi
00545E84 E8F355EEFF       call SetOrdProp
00545E89 E9E2020000       jmp $00546170
HSEDBOutlook.pas.2181: 35: SetOrdProp(Self, Prop, _ContactItem(Disp).Size);
00545E8E 8D45EC           lea eax,[ebp-$14]
00545E91 50               push eax
00545E92 8B45FC           mov eax,[ebp-$04]
00545E95 50               push eax
00545E96 8B00             mov eax,[eax]
00545E98 FF90A8000000     call dword ptr [eax+$000000a8]
00545E9E E8313EECFF       call @CheckAutoResult
00545EA3 8B4DEC           mov ecx,[ebp-$14]
00545EA6 8BD3             mov edx,ebx
00545EA8 8BC7             mov eax,edi
00545EAA E8CD55EEFF       call SetOrdProp
00545EAF E9BC020000       jmp $00546170
HSEDBOutlook.pas.2182: 127: SetOrdProp(Self, Prop, _ContactItem(Disp).Gender);
00545EB4 8D45EC           lea eax,[ebp-$14]
00545EB7 50               push eax
00545EB8 8B45FC           mov eax,[ebp-$04]
00545EBB 50               push eax
00545EBC 8B00             mov eax,[eax]
00545EBE FF9018020000     call dword ptr [eax+$00000218]
00545EC4 E80B3EECFF       call @CheckAutoResult
00545EC9 8B4DEC           mov ecx,[ebp-$14]
00545ECC 8BD3             mov edx,ebx
00545ECE 8BC7             mov eax,edi
00545ED0 E8A755EEFF       call SetOrdProp
00545ED5 E996020000       jmp $00546170
HSEDBOutlook.pas.2183: 233: SetOrdProp(Self, Prop, _ContactItem(Disp).SelectedMailingAddress);
00545EDA 8D45EC           lea eax,[ebp-$14]
00545EDD 50               push eax
00545EDE 8B45FC           mov eax,[ebp-$04]
00545EE1 50               push eax
00545EE2 8B00             mov eax,[eax]
00545EE4 FF90C0030000     call dword ptr [eax+$000003c0]
00545EEA E8E53DECFF       call @CheckAutoResult
00545EEF 8B4DEC           mov ecx,[ebp-$14]
00545EF2 8BD3             mov edx,ebx
00545EF4 8BC7             mov eax,edi

00545EF6 E88155EEFF       call SetOrdProp
00545EFB E970020000       jmp $00546170
HSEDBOutlook.pas.2186: case Prop^.Index of
00545F00 83E81C           sub eax,$1c
00545F03 7414             jz $00545f19
00545F05 83E804           sub eax,$04
00545F08 7436             jz $00545f40
00545F0A 83E806           sub eax,$06
00545F0D 7458             jz $00545f67
00545F0F 83E87B           sub eax,$7b
00545F12 747A             jz $00545f8e
00545F14 E957020000       jmp $00546170
HSEDBOutlook.pas.2187: 28: SetOrdProp(Self, Prop, Ord(_ContactItem(Disp).NoAging));
00545F19 8D45E8           lea eax,[ebp-$18]
00545F1C 50               push eax
00545F1D 8B45FC           mov eax,[ebp-$04]
00545F20 50               push eax
00545F21 8B00             mov eax,[eax]
00545F23 FF908C000000     call dword ptr [eax+$0000008c]
00545F29 E8A63DECFF       call @CheckAutoResult
00545F2E 0FBF4DE8         movsx ecx,[ebp-$18]
00545F32 8BD3             mov edx,ebx
00545F34 8BC7             mov eax,edi
00545F36 E84155EEFF       call SetOrdProp
00545F3B E930020000       jmp $00546170
HSEDBOutlook.pas.2188: 32: SetOrdProp(Self, Prop, Ord(_ContactItem(Disp).Saved));
00545F40 8D45E8           lea eax,[ebp-$18]
00545F43 50               push eax
00545F44 8B45FC           mov eax,[ebp-$04]
00545F47 50               push eax
00545F48 8B00             mov eax,[eax]
00545F4A FF909C000000     call dword ptr [eax+$0000009c]
00545F50 E87F3DECFF       call @CheckAutoResult
00545F55 0FBF4DE8         movsx ecx,[ebp-$18]
00545F59 8BD3             mov edx,ebx
00545F5B 8BC7             mov eax,edi
00545F5D E81A55EEFF       call SetOrdProp
00545F62 E909020000       jmp $00546170
HSEDBOutlook.pas.2189: 38: SetOrdProp(Self, Prop, Ord(_ContactItem(Disp).UnRead));
00545F67 8D45E8           lea eax,[ebp-$18]
00545F6A 50               push eax
00545F6B 8B45FC           mov eax,[ebp-$04]
00545F6E 50               push eax
00545F6F 8B00             mov eax,[eax]
00545F71 FF90B4000000     call dword ptr [eax+$000000b4]
00545F77 E8583DECFF       call @CheckAutoResult
00545F7C 0FBF4DE8         movsx ecx,[ebp-$18]
00545F80 8BD3             mov edx,ebx
00545F82 8BC7             mov eax,edi
00545F84 E8F354EEFF       call SetOrdProp
00545F89 E9E2010000       jmp $00546170
HSEDBOutlook.pas.2190: 161: SetOrdProp(Self, Prop, Ord(_ContactItem(Disp).Journal));
00545F8E 8D45E8           lea eax,[ebp-$18]
00545F91 50               push eax
00545F92 8B45FC           mov eax,[ebp-$04]
00545F95 50               push eax
00545F96 8B00             mov eax,[eax]
00545F98 FF90A0020000     call dword ptr [eax+$000002a0]
00545F9E E8313DECFF       call @CheckAutoResult
00545FA3 0FBF4DE8         movsx ecx,[ebp-$18]
00545FA7 8BD3             mov edx,ebx
00545FA9 8BC7             mov eax,edi
00545FAB E8CC54EEFF       call SetOrdProp
00545FB0 E9BB010000       jmp $00546170
HSEDBOutlook.pas.2198: case GetTypeData(Prop^.PropType^).FloatType of
00545FB5 8B03             mov eax,[ebx]
00545FB7 8B00             mov eax,[eax]
00545FB9 E8864FEEFF       call GetTypeData
00545FBE 0FB600           movzx eax,[eax]
00545FC1 FEC8             dec al
00545FC3 7405             jz $00545fca
00545FC5 E9A6010000       jmp $00546170
HSEDBOutlook.pas.2203: case Prop^.Index of
00545FCA 8B4310           mov eax,[ebx+$10]
00545FCD 83E810           sub eax,$10
00545FD0 7418             jz $00545fea
00545FD2 83E806           sub eax,$06
00545FD5 743D             jz $00546014
00545FD7 83E81D           sub eax,$1d
00545FDA 7462             jz $0054603e
00545FDC 83E806           sub eax,$06
00545FDF 0F8486000000     jz $0054606b
00545FE5 E986010000       jmp $00546170
HSEDBOutlook.pas.2204: 16: SetFloatProp(Self, Prop, _ContactItem(Disp).CreationTime);
00545FEA 8D45E0           lea eax,[ebp-$20]
00545FED 50               push eax
00545FEE 8B45FC           mov eax,[ebp-$04]
00545FF1 50               push eax
00545FF2 8B00             mov eax,[eax]
00545FF4 FF505C           call dword ptr [eax+$5c]
00545FF7 E8D83CECFF       call @CheckAutoResult
00545FFC DD45E0           fld qword ptr [ebp-$20]
00545FFF 83C4F4           add esp,-$0c
00546002 DB3C24           fstp tbyte ptr [esp]
00546005 9B               wait 
00546006 8BD3             mov edx,ebx
00546008 8BC7             mov eax,edi
0054600A E8A963EEFF       call SetFloatProp
0054600F E95C010000       jmp $00546170
HSEDBOutlook.pas.2205: 22: SetFloatProp(Self, Prop, _ContactItem(Disp).LastModificationTime);
00546014 8D45E0           lea eax,[ebp-$20]
00546017 50               push eax
00546018 8B45FC           mov eax,[ebp-$04]
0054601B 50               push eax
0054601C 8B00             mov eax,[eax]
0054601E FF5074           call dword ptr [eax+$74]
00546021 E8AE3CECFF       call @CheckAutoResult
00546026 DD45E0           fld qword ptr [ebp-$20]
00546029 83C4F4           add esp,-$0c
0054602C DB3C24           fstp tbyte ptr [esp]
0054602F 9B               wait 
00546030 8BD3             mov edx,ebx
00546032 8BC7             mov eax,edi
00546034 E87F63EEFF       call SetFloatProp
00546039 E932010000       jmp $00546170
HSEDBOutlook.pas.2206: 51: SetFloatProp(Self, Prop, _ContactItem(Disp).Anniversary);
0054603E 8D45E0           lea eax,[ebp-$20]
00546041 50               push eax
00546042 8B45FC           mov eax,[ebp-$04]
00546045 50               push eax
00546046 8B00             mov eax,[eax]
00546048 FF90E8000000     call dword ptr [eax+$000000e8]
0054604E E8813CECFF       call @CheckAutoResult
00546053 DD45E0           fld qword ptr [ebp-$20]
00546056 83C4F4           add esp,-$0c
00546059 DB3C24           fstp tbyte ptr [esp]
0054605C 9B               wait 
0054605D 8BD3             mov edx,ebx
0054605F 8BC7             mov eax,edi
00546061 E85263EEFF       call SetFloatProp
00546066 E905010000       jmp $00546170
HSEDBOutlook.pas.2207: 57: SetFloatProp(Self, Prop, _ContactItem(Disp).Birthday);
0054606B 8D45E0           lea eax,[ebp-$20]
0054606E 50               push eax
0054606F 8B45FC           mov eax,[ebp-$04]
00546072 50               push eax
00546073 8B00             mov eax,[eax]
00546075 FF9000010000     call dword ptr [eax+$00000100]
0054607B E8543CECFF       call @CheckAutoResult
00546080 DD45E0           fld qword ptr [ebp-$20]
00546083 83C4F4           add esp,-$0c
00546086 DB3C24           fstp tbyte ptr [esp]
00546089 9B               wait 
0054608A 8BD3             mov edx,ebx
0054608C 8BC7             mov eax,edi
0054608E E82563EEFF       call SetFloatProp
00546093 E9D8000000       jmp $00546170
HSEDBOutlook.pas.2213: SetStrProp(Self, Prop, ReadDispStrProp(Disp, VtOffset));
00546098 8D45D8           lea eax,[ebp-$28]
0054609B 50               push eax
0054609C 8B4DF0           mov ecx,[ebp-$10]
0054609F 8B55FC           mov edx,[ebp-$04]
005460A2 8BC7             mov eax,edi
005460A4 E8A3030000       call THSEBaseData.ReadDispStrProp
005460A9 8B55D8           mov edx,[ebp-$28]
005460AC 8D45DC           lea eax,[ebp-$24]
005460AF E88C0FECFF       call @UStrFromWStr
005460B4 8B45DC           mov eax,[ebp-$24]
005460B7 8BD7             mov edx,edi
005460B9 8945EC           mov [ebp-$14],eax
005460BC 8B4DEC           mov ecx,[ebp-$14]
005460BF 8BC3             mov eax,ebx
005460C1 92               xchg eax,edx
005460C2 E8B560EEFF       call SetUnicodeStrProp
005460C7 E9A4000000       jmp $00546170
HSEDBOutlook.pas.2216: wsPropVal := ReadDispStrProp(Disp, VtOffset);
005460CC 8D45F8           lea eax,[ebp-$08]
005460CF 50               push eax
005460D0 8B4DF0           mov ecx,[ebp-$10]
005460D3 8B55FC           mov edx,[ebp-$04]
005460D6 8BC7             mov eax,edi
005460D8 E86F030000       call THSEBaseData.ReadDispStrProp
HSEDBOutlook.pas.2217: SetWideStrProp(Self, Prop, wsPropVal);
005460DD 8B4DF8           mov ecx,[ebp-$08]
005460E0 8BD3             mov edx,ebx
005460E2 8BC7             mov eax,edi
005460E4 E82B5DEEFF       call SetWideStrProp
005460E9 E982000000       jmp $00546170
HSEDBOutlook.pas.2220: SetUnicodeStrProp(Self, Prop, ReadDispStrProp(Disp, VtOffset)); //SB: ??
005460EE 8D45D0           lea eax,[ebp-$30]
005460F1 50               push eax
005460F2 8B4DF0           mov ecx,[ebp-$10]
005460F5 8B55FC           mov edx,[ebp-$04]
005460F8 8BC7             mov eax,edi
005460FA E84D030000       call THSEBaseData.ReadDispStrProp
005460FF 8B55D0           mov edx,[ebp-$30]
00546102 8D45D4           lea eax,[ebp-$2c]
00546105 E8360FECFF       call @UStrFromWStr
0054610A 8B4DD4           mov ecx,[ebp-$2c]
0054610D 8BD3             mov edx,ebx
0054610F 8BC7             mov eax,edi
00546111 E86660EEFF       call SetUnicodeStrProp
00546116 EB58             jmp $00546170
HSEDBOutlook.pas.2222: SetVariantProp(Self, Prop, Variant(null));
00546118 8D45C0           lea eax,[ebp-$40]
0054611B E8883DEEFF       call Null
00546120 8D4DC0           lea ecx,[ebp-$40]
00546123 8BD3             mov edx,ebx
00546125 8BC7             mov eax,edi
00546127 E8D864EEFF       call SetVariantProp
0054612C EB42             jmp $00546170
HSEDBOutlook.pas.2227: DynArray := nil; // "nil array"
0054612E 33C0             xor eax,eax
HSEDBOutlook.pas.2229: SetDynArrayProp(Self, Prop, DynArray);
00546130 8BC8             mov ecx,eax
00546132 8BD3             mov edx,ebx
00546134 8BC7             mov eax,edi
00546136 E80168EEFF       call SetDynArrayProp
0054613B EB33             jmp $00546170
HSEDBOutlook.pas.2232: raise EPropertyConvertError.CreateResFmt(@SInvalidPropertyType,

0054613D 8D55BC           lea edx,[ebp-$44]
00546140 8B03             mov eax,[ebx]
00546142 8B00             mov eax,[eax]
00546144 E8AB4DEEFF       call GetTypeName
00546149 8B45BC           mov eax,[ebp-$44]
0054614C 8945E0           mov [ebp-$20],eax
0054614F C645E411         mov byte ptr [ebp-$1c],$11
00546153 8D45E0           lea eax,[ebp-$20]
00546156 50               push eax
00546157 6A00             push $00
00546159 8B0D18955600     mov ecx,[$00569518]
0054615F B201             mov dl,$01
00546161 A180A44200       mov eax,[$0042a480]
00546166 E8C931EDFF       call Exception.CreateResFmt
0054616B E844FAEBFF       call @RaiseExcept
HSEDBOutlook.pas.2235: end;
00546170 FF45F4           inc dword ptr [ebp-$0c]
HSEDBOutlook.pas.2170: for I := 0 to FPropCount - 1 do
00546173 4E               dec esi
00546174 0F8514FCFFFF     jnz $00545d8e
HSEDBOutlook.pas.2236: end;
0054617A 33C0             xor eax,eax


ReadDispStrProp...

HSEDBOutlook.pas.2332: mov eax, Result               // load and clear out prop
00546458 8B4508           mov eax,[ebp+$08]
HSEDBOutlook.pas.2333: call System.@WStrClr
0054645B E8A804ECFF       call @WStrClr
HSEDBOutlook.pas.2334: push eax                      // push prop onto stack.
00546460 50               push eax
HSEDBOutlook.pas.2335: mov eax, Disp                 // Disp-Poiter auf eax speichern
00546461 8B45FC           mov eax,[ebp-$04]
HSEDBOutlook.pas.2336: push eax                      // push interface pointer onto Stack
00546464 50               push eax
HSEDBOutlook.pas.2337: mov eax, [eax]                // dereference vtable pointer
00546465 8B00             mov eax,[eax]
HSEDBOutlook.pas.2338: add eax, PropIdx              // add vtable offset (ecx)
00546467 0345F8           add eax,[ebp-$08]
HSEDBOutlook.pas.2339: call dword ptr [eax]          // call method
0054646A FF10             call dword ptr [eax]
HSEDBOutlook.pas.2340: call System.@CheckAutoResult  // use safecall error checker
0054646C E86338ECFF       call @CheckAutoResult
HSEDBOutlook.pas.2343: end;
00546471 59               pop ecx

ist das hilfreich?

Moderiert von user profile iconNarses: Code-Tags hinzugefügt

---Moderiert von user profile iconNarses: Beiträge zusammengefasst---

meinst du folgendermaßen?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
      tkFloat:
        case GetTypeData(Prop^.PropType^).FloatType of
          ftSingle, ftComp: ;
          ftExtended: ;
          ftDouble:
            begin
              case Prop^.Index of
                16: vDate := _ContactItem(Disp).CreationTime;
                22: vDate := _ContactItem(Disp).LastModificationTime;
                51: vDate := _ContactItem(Disp).Anniversary;
                57: vDate := _ContactItem(Disp).Birthday;
              end;
              if not ( VDate = null ) then SetFloatProp(Self, Prop, vDate);
            end;
          ftCurr: ;
        end;

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt