2006/8/8, Michael Van Canneyt <[EMAIL PROTECTED]>:
The problem is more likely that all arguments are extended, which probably means that the stack is used differently. Are they pushed on the FPU stack ?
Ok, I found this procedure that is used to handle parameters... Maybe this is the actual asm code who is not good... ??? procedure PutOnFPUStackExtended(ft: extended); asm fstp tbyte ptr [ft] end; And here is a part of the monstruous function MyAllMethodsHandler2 that work with the arguments: //... if (Res <> nil) then begin Params.DeleteLast; if (ResultAsRegister(Res.FType)) then begin if (res^.FType.BaseType = btSingle) or (res^.FType.BaseType = btDouble) or (res^.FType.BaseType = btCurrency) or (res^.Ftype.BaseType = btExtended) then begin case Res^.FType.BaseType of btSingle: PutOnFPUStackExtended(PPSVariantSingle(res).Data); btDouble: PutOnFPUStackExtended(PPSVariantDouble(res).Data); btExtended: PutOnFPUStackExtended(PPSVariantExtended(res).Data); btCurrency: PutOnFPUStackExtended(PPSVariantCurrency(res).Data); end; DestroyHeapVariant(Res); Res := nil; end else begin {$IFNDEF PS_NOINT64} if res^.FType.BaseType <> btS64 then {$ENDIF} CopyArrayContents(Pointer(Longint(Stack)-8), @PPSVariantData(res)^.Data, 1, Res^.FType); end; end; DestroyHeapVariant(res); end; //... -- Alexandre Leclerc _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal