HALF_PTR Windows数据类型 [英] HALF_PTR Windows data type

查看:123
本文介绍了HALF_PTR Windows数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VS文档说明


指针大小的一半。在包含指针和两个小字段的结构中使用。

Half the size of a pointer. Use within a structure that contains a pointer and two small fields.

这是什么类型,

推荐答案


在包含指针和两个小字段的结构中使用

Use within a structure that contains a pointer and two small fields.

这意味着在以下结构中,不需要填充:

This means that in the following structure, no padding is required:

struct Example {
    void* pointer;
    HALF_PTR one;
    HALF_PTR two;
};

当然,这只有在 HALF_PTR (64位系统上为32位,32位系统上为16位)足以保存所需的值。

Of course, this is only relevant if the size of HALF_PTR (32 bits on a 64-bit system, 16 bits on a 32-bit system) is sufficient to hold the intended values.

这篇关于HALF_PTR Windows数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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