transfering to a dll that ecpect a VariantTime???

  • Thread starter Thread starter ORC
  • Start date Start date
O

ORC

I'm going to transfer a parameter to a dll that expects a VariantTime or
alternatively a SYSTEMTIME - but what are the corresponding formats in C#?

Thanks
Ole
 
Ole,

You can call the ToFileTime method on the DateTime instance. This will
return a long (64-bit value), which is what a FILETIME is represented as.

Once you have that, you can call the FileTimeToSystemTime API function
to translate to a SYSTEMTIME.

Hope this helps.
 
Great - thanks!

Ole

Nicholas Paldino said:
Ole,

You can call the ToFileTime method on the DateTime instance. This will
return a long (64-bit value), which is what a FILETIME is represented as.

Once you have that, you can call the FileTimeToSystemTime API function
to translate to a SYSTEMTIME.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

ORC said:
I'm going to transfer a parameter to a dll that expects a VariantTime or
alternatively a SYSTEMTIME - but what are the corresponding formats in C#?

Thanks
Ole
 
Back
Top