C#ULONG_PTR等效

前端之家收集整理的这篇文章主要介绍了C#ULONG_PTR等效前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我不得不在C#中的不安全代码中传递ULONG_PTR.

我理解ULONG_PTR的原因是允许32位和64位操作系统使用单个代码库.

这是C#的UIntPtr的情况吗?将.Net UIntPtr作为ULONG_PTR参数传递时,我可以自信吗?

谢谢!

解决方法

MSDN开始:

The IntPtr type is CLS-compliant,
while the UIntPtr type is not. Only
the IntPtr type is used in the common
language runtime. The UIntPtr type is
provided mostly to maintain
architectural symmetry with the IntPtr
type

两种类型都能够存储32位和64位指针.首选类型是IntPtr.

原文链接:https://www.f2er.com/c/239557.html

猜你在找的C&C++相关文章