This works just fine on OS X, but when I run on Windows, Year turns out being a large, random number and the rest of the values zero. I would assume I’m doing something wrong, but it works great on OS X.
OK, I worked on this some more this evening and realized that if I compile a debug version of my DLL on Windows, it works great. Compile a release version, it fails miserably, only on passing the date. So, I am assuming therefore, I have some optimization flag set that Xojo is not liking on the Windows/Release side of things. I’ll spend some more time with it tomorrow and hopefully report back success tomorrow and let you know which setting was causing this issue.
If you initialize the values to something specific (noticeably bogus), do they stay bogus? Also, have you tried running on OS X with Guard Malloc enabled? I’ve found it very helpful in rooting out bugs, even if they may appear platform specific.
If I initialize the values to something bogus, they stay at their bogus values. Does this give you any clue? I have some 200 functions in my plugin and the only two (that I have found) that do not work properly under Windows when compiled for Release mode are the only two that receive a date value from Xojo.
I have not tried OS X with guard malloc enabled, I will do that next.