关于x64问题的FILETIME. [英] FILETIME on x64 question.

查看:73
本文介绍了关于x64问题的FILETIME.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用FILETIME结构进行互操作.它似乎可以在我的comp上正常工作,但是在x64体系结构上会出现一些问题吗?

I''m using my FILETIME structure for interop. It seems to work on my comp ,but will I have some problems on x64 architectures?

[StructLayout(LayoutKind.Explicit)]
public struct FILETIME
{
    [FieldOffset(0)]
    public int dwLowDateTime;
    [FieldOffset(4)]
    public int dwHighDateTime;
    [FieldOffset(0)]
    public long QuadDateTime;
}


我正在访问结构的四部分,而不是分别访问低和高,以在DateTime之间进行转换.


I''m accessing quad part of the structure instead of low and high separately for converting between DateTime.

推荐答案

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

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



没有FieldOffSet.但这取决于您要调用的Win32函数返回的FILETIME.



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


这篇关于关于x64问题的FILETIME.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆