habe folgendes problem
Delphi-Quellcode:
// Bohrungs Shape
// Setze Shape
procedure THoleShape.Set_BodyShape(Value:Variant);
Var
FPosArray : OleVariant;
FPosValues : Array[0..2] of Double;
i : Integer;
tta : tVarType;
S : string;
begin
FBodyShape := Value;
// Art der Bohrung
BohrungsType := FBodyShape.Type;
// Setze Durchmesser
Diameter := FBodyShape.Diameter.Value;
//Variantes Array erzeugen
FPosArray := VarArrayOf([FPosValues[ 0],FPosValues[ 1],FPosValues[ 2]]);
TTA := vartype(FPosArray[0]); // zeigt 5 an als Double alles OK
TTA := vartype(FPosArray[1]);
TTA := vartype(FPosArray[2]);
// Abfrage
FBodyShape.GetOrigin(FPosArray);
//
TTA := vartype(FPosArray[0]); // zeigt 5 an als Double alles OK
TTA := vartype(FPosArray[1]);
TTA := vartype(FPosArray[2]);
//
S := varTypeAsString(FPosArray[0]); // zeigt $00Af an = 175
// Positionen
// sollte 175 - 275 - 0 rauskommen
FXpos := FPosArray[0]; // keine Werte
FYpos := FPosArray[1];
FZpos := 0;
end;
die Funktion in der TLB ist folgend
Delphi-Quellcode:
HoleDisp = dispinterface
...
....
procedure GetOrigin(ioOrigin: {??PSafeArray}OleVariant); dispid 1611071508;
...
....
ioOrigion ist als SafeArrayVariant als Double definiert
Es werden nur unsinnige werte oder nur 0 werte zurückgegeben
Vielleicht hat ja jemand eine lösung