LongPtr 数据类型LongPtr data type

LongPtr(32 位系统上的整型, 64 位系统上的LongLong integer) 变量存储为:LongPtr (Long integer on 32-bit systems, LongLong integer on 64-bit systems) variables are stored as:

  • 已签名的32位 (4 字节) 数字, 值范围为-2147483648 到2147483647在32位系统上Signed 32-bit (4-byte) numbers ranging in value from -2,147,483,648 to 2,147,483,647 on 32-bit systems

  • 已签名的64位 (8 字节) 数字, 值范围为-9223372036854775808 到 9223372036854775807, 在64位系统上Signed 64-bit (8-byte) numbers ranging in value from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 on 64-bit systems

备注

LongPtr 不是真正的数据类型,因为它在 32 位环境中会转换为 Long,或在 64 位环境中会转换为 LongLongLongPtr is not a true data type because it transforms to a Long in 32-bit environments, or a LongLong in 64-bit environments. 使用 LongPtr 能够编写在 32 位和 64 位环境中均可运行的可移植代码。Using LongPtr enables writing portable code that can run in both 32-bit and 64-bit environments. LongPtr 用于指针和句柄。Use LongPtr for pointers and handles.

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.