Export (0) Print
Expand All

UIntPtr Structure

A platform-specific type that is used to represent a pointer or a handle.

The UIntPtr type is not CLS-compliant. The CLS-compliant alternative type is IntPtr. For more information about CLS compliance, see What is the Common Language Specification.

For a list of all members of this type, see UIntPtr Members.

System.Object
   System.ValueType
      System.UIntPtr

[Visual Basic]
<CLSCompliant(False)>
<Serializable>
Public Structure UIntPtr
   Implements ISerializable
[C#]
[CLSCompliant(false)]
[Serializable]
public struct UIntPtr : ISerializable
[C++]
[CLSCompliant(false)]
[Serializable]
public __value struct UIntPtr : public ISerializable

[JScript] In JScript, you can use the structures in the .NET Framework, but you cannot define your own.

Thread Safety

This type is safe for multithreaded operations.

Remarks

The UIntPtr type is designed to be an integer whose size is platform-specific. That is, an instance of this type is expected to be 32-bits on 32-bit hardware and operating systems, and 64-bits on 64-bit hardware and operating systems.

The UIntPtr type can be used by languages that support pointers, and as a common means of referring to data between languages that do and do not support pointers. UIntPtr objects can also be used to hold handles.

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.

This type implements the ISerializable interface.

Requirements

Namespace: System

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: Mscorlib (in Mscorlib.dll)

See Also

UIntPtr Members | System Namespace | IntPtr

Show:
© 2014 Microsoft