SystemTimeToFileTime (coredll)
Last changed: JasonK.Handleman-208.44.117.10

.
Summary

C# Signature:

[DllImport("kernel32.dll", EntryPoint = "SystemTimeToFileTime", SetLastError = true)]
    public static extern bool SystemTimeToFileTime(ref SYSTEMTIME lpSystemTime, ref FILETIME lpFileTime);

VB Signature:

Declare Function SystemTimeToFileTime Lib "Coredll.dll" (TODO) As TODO

User-Defined Types:

SystemTime and FileTime

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

//Taken from http://www.codeproject.com/csharp/timezoneconversions.asp?print=true
private static DateTime SystemTimeToDateTime(ref SYSTEMTIME st)
{
        FILETIME ft = new FILETIME();
        SystemTimeToFileTime(ref st, out ft);
        DateTime dt = new DateTime((((long)ft.dwHighDateTime) << 32) | (uint)ft.dwLowDateTime);
        return dt;
}

Documentation