[Mono-bugs] [Bug 521383] New: P/invoke marshaller should handle DateTime

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jul 12 17:56:28 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=521383


           Summary: P/invoke marshaller should handle DateTime
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: interop
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: robertj at gmx.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1)
Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)

It looks like MS.NET is marshaling DateTimes as an OLE Automation DATE (a
double) data type even for plain p/invoke DllImports.

The following cases are supported:

- DateTimes as method arguments
- DateTime fields inside a struct

Not supported are DateTime return types. Maybe because they are not needed for
COM interop.

A DateTime argument or field is converted to a "double". The value is set to
DateTimeInstance.ToOADate () and read back with DateTime.FromOADate (double).



Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
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