Re: [ADVANCED-DOTNET] Marshalling of COM dates

2007-11-05 Thread Peter Ritchie
I've written a custom marshaler for DateTime, but I can't seem to get it to be used with a COM object. Custom marshaling seems straightforward with simple PInvokes; but it seems to be ignored with COM interfaces. i.e. the custom marshaler works fine when I PInvoke a method whose parameter is attri

Re: [ADVANCED-DOTNET] Marshalling of COM dates

2007-11-05 Thread Peter Ritchie
eter Ritchie" <[EMAIL PROTECTED]> > To: > Sent: Saturday, November 03, 2007 7:02 PM > Subject: Re: [ADVANCED-DOTNET] Marshalling of COM dates > > >>I think you'll have to declare your own managed interface for your native >> interfaces if you want to use c

Re: [ADVANCED-DOTNET] Marshalling of COM dates

2007-11-05 Thread Peter van der Weerd
: Saturday, November 03, 2007 7:02 PM Subject: Re: [ADVANCED-DOTNET] Marshalling of COM dates I think you'll have to declare your own managed interface for your native interfaces if you want to use custom marshaling (i.e. not use tlbimp) But, before going that route, how are the "COM dates&

Re: [ADVANCED-DOTNET] Marshalling of COM dates

2007-11-03 Thread Peter Ritchie
I think you'll have to declare your own managed interface for your native interfaces if you want to use custom marshaling (i.e. not use tlbimp) But, before going that route, how are the "COM dates" declared in the IDL? I've round-tripped dates through a native COM object without losing precision.

Re: [ADVANCED-DOTNET] Marshalling of COM dates

2007-11-03 Thread Peter van der Weerd
/P - Original Message - From: "Ryan Heath" <[EMAIL PROTECTED]> To: Sent: Friday, November 02, 2007 10:02 AM Subject: Re: [ADVANCED-DOTNET] Marshalling of COM dates Hi Peter, Does this help? http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.icust

Re: [ADVANCED-DOTNET] Marshalling of COM dates

2007-11-02 Thread Ryan Heath
Hi Peter, Does this help? http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.icustommarshaler(VS.80).aspx // Ryan On 11/1/07, Peter van der Weerd <[EMAIL PROTECTED]> wrote: > Hi, > > The standard marshaller rounds dates to a whole number of seconds while > passing dates fr

[ADVANCED-DOTNET] Marshalling of COM dates

2007-11-01 Thread Peter van der Weerd
Hi, The standard marshaller rounds dates to a whole number of seconds while passing dates from COM into .Net, loosing a lot of precision. Is there a way to replace the standard marshaller? At the moment I supply the dates as a double, doing the conversion myself, but I find myself more and mo