Hello
FB4, Del[hi 10.4.2
In FB3 I have UDF containing simple function to convert datetime to double:
function CurrentTimestampToDouble(const p: PBoolean): PDouble; //true=UTC, false=now
var
dt: TDateTime;
d: double;
begin
if p^ then
dt := TkbmMWDateTime.Now.UTC
else
dt := TkbmMWDateTime.Now.Local;
d := dt;
result := ib_util_malloc(SizeOf(d));
result := @d;
end;
Since FB4 docs strongly discourage using UDFs anymore, I would like to create new UDR with this function. There is little information on creating UDRs. I’ve looked at all the docs in FB4 release and all the examples, but I still cannot figure out what to do.
Is there some working example (code) how to create new UDR dll and can it be done in Delphi?
Any information is greatly appreciated.
Thank you
Zoran