DateTime.Now issue

I need to timestamp an object created within my plugin. I try to get this timestamp with the method described by @William Yu here in order to populate a property. Unfortunately dateTimeNowFunc is always null. I use Xojo 2020r1.2 and the matching SDK.

1 Like

The declaration in his post is wrong, it should be:

typedef REALobject(*DateTimeNow_Proc)(REALobject);

    DateTimeNow_Proc dateTimeNowFunc = (DateTimeNow_Proc)REALLoadSharedMethod(DateClassRef, "Now(timeZone as TimeZone) As DateTime");

Thanks Björn. It works now.