Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm using my FILETIME structure for interop. It seems to work on my comp ,but will I have some problems on x64 architectures?
C#
[StructLayout(LayoutKind.Explicit)]
public struct FILETIME
{
    [FieldOffset(0)]
    public int dwLowDateTime;
    [FieldOffset(4)]
    public int dwHighDateTime;
    [FieldOffset(0)]
    public long QuadDateTime;
}

I'm accessing quad part of the structure instead of low and high separately for converting between DateTime.
Posted
Updated 23-May-11 5:27am
v2

1 solution

Look at pinvoke.net FILETIME (Structures)[^]

FILETIME is defined as:
C#
[StructLayout(LayoutKind.Sequential)]
struct FILETIME {
    public uint DateTimeLow;
    public uint DateTimeHigh;
}


With no FieldOffSet. But it depends on what Win32 function you are calling that returns a FILETIME.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900