[Mono-bugs] [Bug 322934] StructLayout for DateTime passed to managed code

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 6 18:09:51 EDT 2009


User tom_hindle at sil.org added comment

--- Comment #3 from tom hindle <tom_hindle at sil.org>  2009-10-06 16:09:51 MDT ---
Expected result (from new test case): 


Actual result:
** ERROR **: Type System.DateTime which is passed to unmanaged code must have a
StructLayout attribute

Or message box saying same thing on mono/Windows.


Seems to automatically marshal this value type to a native DATE.

Quote from DateTime page on MSDN:
"When only a time is passed from the .NET Framework to COM, special processing
is performed that converts the time to the format used by COM."

Switching DateTime from [StructLayout(LayoutKind.Auto)] to

causes the result to on mono to be 0.0.

I think mono needs to handle this as a special case.

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list