1 <Type Name="UIntPtr" FullName="System.UIntPtr" FullNameSP="System_UIntPtr" Maintainer="ecma">
2 <TypeSignature Language="ILASM" Value=".class public sequential sealed serializable UIntPtr extends System.ValueType" />
3 <TypeSignature Language="C#" Value="public struct UIntPtr : System.Runtime.Serialization.ISerializable" />
4 <MemberOfLibrary>RuntimeInfrastructure</MemberOfLibrary>
6 <AssemblyName>mscorlib</AssemblyName>
7 <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
8 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
9 <AssemblyVersion>2.0.0.0</AssemblyVersion>
10 <AssemblyVersion>4.0.0.0</AssemblyVersion>
12 <ThreadingSafetyStatement>This type is safe for multithreaded operations. </ThreadingSafetyStatement>
14 <BaseTypeName>System.ValueType</BaseTypeName>
18 <InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
23 <AttributeName>System.CLSCompliant(false)</AttributeName>
26 <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
31 <para>An implementation-specific type that is used to represent a pointer or a
35 <para>The <see cref="T:System.UIntPtr" /> type is designed
36 to be an implementation-sized pointer. An instance of this type is expected to be
37 the size of a <see langword="native unsigned int" /> for the current
38 implementation.</para>
40 For more information on the <see langword="native unsigned int" /> type, see Partition II of
41 the CLI Specification.
43 <block subset="none" type="note">
45 <see cref="T:System.UIntPtr" /> instances
47 be used to hold handles.</para>
48 <para> The <see cref="T:System.IntPtr" /> type is
49 CLS-compliant while the <see cref="T:System.UIntPtr" />
50 type is not. The <see cref="T:System.UIntPtr" /> type is provided mostly to
51 maintain architectural symmetry with the <see cref="T:System.IntPtr" />
57 <Member MemberName=".ctor">
58 <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(unsigned int32 value)" />
59 <MemberSignature Language="C#" Value="public UIntPtr (uint value);" />
60 <MemberType>Constructor</MemberType>
63 <Parameter Name="value" Type="System.UInt32" />
66 <param name="value">A <see cref="T:System.UInt32" /> containing a pointer or handle.</param>
68 <para> Constructs a new <see cref="T:System.UIntPtr" /> structure using the
69 specified <see cref="T:System.UInt32" /> containing a pointer
72 <remarks>To be added.</remarks>
74 <Excluded>0</Excluded>
76 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
77 <AssemblyVersion>2.0.0.0</AssemblyVersion>
78 <AssemblyVersion>4.0.0.0</AssemblyVersion>
81 <Member MemberName=".ctor">
82 <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(unsigned int64 value)" />
83 <MemberSignature Language="C#" Value="public UIntPtr (ulong value);" />
84 <MemberType>Constructor</MemberType>
87 <Parameter Name="value" Type="System.UInt64" />
90 <param name="value">A <see cref="T:System.UInt64" /> containing a pointer or a handle.</param>
92 <para> Constructs a new <see cref="T:System.UIntPtr" /> structure using the
93 specified <see cref="T:System.UInt64" /> containing a pointer
96 <remarks>To be added.</remarks>
97 <exception cref="T:System.OverflowException">The current platform is a 32-bit platform and the value of the current instance is greater than <see cref="F:System.UInt32.MaxValue" />.</exception>
99 <Excluded>0</Excluded>
101 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
102 <AssemblyVersion>2.0.0.0</AssemblyVersion>
103 <AssemblyVersion>4.0.0.0</AssemblyVersion>
106 <Member MemberName=".ctor">
107 <MemberSignature Language="C#" Value="public UIntPtr (void* value);" />
108 <MemberType>Constructor</MemberType>
111 <AttributeName>System.CLSCompliant(false)</AttributeName>
115 <Parameter Name="value" Type="System.Void*" />
118 <param name="value">To be added.</param>
119 <summary>To be added.</summary>
120 <remarks>To be added.</remarks>
123 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
124 <AssemblyVersion>2.0.0.0</AssemblyVersion>
125 <AssemblyVersion>4.0.0.0</AssemblyVersion>
128 <Member MemberName="Add">
129 <MemberSignature Language="C#" Value="public static UIntPtr Add (UIntPtr pointer, int offset);" />
130 <MemberType>Method</MemberType>
132 <AssemblyVersion>4.0.0.0</AssemblyVersion>
135 <ReturnType>System.UIntPtr</ReturnType>
138 <Parameter Name="pointer" Type="System.UIntPtr" />
139 <Parameter Name="offset" Type="System.Int32" />
142 <param name="pointer">To be added.</param>
143 <param name="offset">To be added.</param>
144 <summary>To be added.</summary>
145 <returns>To be added.</returns>
146 <remarks>To be added.</remarks>
149 <Member MemberName="Equals">
150 <MemberSignature Language="ILASM" Value=".method public hidebysig virtual bool Equals(object obj)" />
151 <MemberSignature Language="C#" Value="public override bool Equals (object obj);" />
152 <MemberType>Method</MemberType>
154 <ReturnType>System.Boolean</ReturnType>
157 <Parameter Name="obj" Type="System.Object" />
160 <param name="obj">The <see cref="T:System.Object" /> to compare to the current instance.</param>
161 <param name="obj">To be added.</param>
163 <para>Determines whether the current instance and the specified <see cref="T:System.Object" /> represent the
164 same type and value.</para>
168 <see langword="true" /> if <paramref name="obj" /> is a <see cref="T:System.UIntPtr" /> instance and has the same value as the
169 current instance. If <paramref name="obj" /> is a null reference or is not an instance of
170 <see cref="T:System.UIntPtr" /> ,
171 returns <see langword="false" />.</para>
176 <block subset="none" type="note">The method overrides <see cref="M:System.Object.Equals(System.Object)" qualify="true" />.</block>
180 <Excluded>0</Excluded>
182 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
183 <AssemblyVersion>2.0.0.0</AssemblyVersion>
184 <AssemblyVersion>4.0.0.0</AssemblyVersion>
187 <Member MemberName="GetHashCode">
188 <MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetHashCode()" />
189 <MemberSignature Language="C#" Value="public override int GetHashCode ();" />
190 <MemberType>Method</MemberType>
192 <ReturnType>System.Int32</ReturnType>
197 <para>Generates a hash code for the current instance.</para>
200 <para>A <see cref="T:System.Int32" />
201 containing the hash code for the current instance.</para>
205 <block subset="none" type="note">The algorithm used to generate the
206 hash code is unspecified.</block>
209 <block subset="none" type="note">This method overrides <see cref="M:System.Object.GetHashCode" qualify="true" />.</block>
213 <Excluded>0</Excluded>
215 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
216 <AssemblyVersion>2.0.0.0</AssemblyVersion>
217 <AssemblyVersion>4.0.0.0</AssemblyVersion>
220 <Member MemberName="op_Addition">
221 <MemberSignature Language="C#" Value="public static UIntPtr op_Addition (UIntPtr pointer, int offset);" />
222 <MemberType>Method</MemberType>
224 <AssemblyVersion>4.0.0.0</AssemblyVersion>
227 <ReturnType>System.UIntPtr</ReturnType>
230 <Parameter Name="pointer" Type="System.UIntPtr" />
231 <Parameter Name="offset" Type="System.Int32" />
234 <param name="pointer">To be added.</param>
235 <param name="offset">To be added.</param>
236 <summary>To be added.</summary>
237 <returns>To be added.</returns>
238 <remarks>To be added.</remarks>
241 <Member MemberName="op_Equality">
242 <MemberSignature Language="ILASM" Value=".method public hidebysig static specialname bool op_Equality(valuetype System.UIntPtr value1, valuetype System.UIntPtr value2)" />
243 <MemberSignature Language="C#" Value="public static bool op_Equality (UIntPtr value1, UIntPtr value2);" />
244 <MemberType>Method</MemberType>
246 <ReturnType>System.Boolean</ReturnType>
249 <Parameter Name="value1" Type="System.UIntPtr" />
250 <Parameter Name="value2" Type="System.UIntPtr" />
253 <param name="value1">The first <see cref="T:System.UIntPtr" /> to compare for equality.</param>
254 <param name="value2">The second <see cref="T:System.UIntPtr" /> to compare for equality.</param>
255 <param name="value2">To be added.</param>
257 <para>Determines whether the two specified instances of <see cref="T:System.UIntPtr" /> represent the same value.</para>
261 <see langword="true" /> if <paramref name="value1" /> represents the same value as
262 <paramref name="value2" />; otherwise, <see langword="false" />.</para>
264 <remarks>To be added.</remarks>
265 <altmember cref="M:System.UIntPtr.Equals(System.Object)" />
267 <Excluded>0</Excluded>
269 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
270 <AssemblyVersion>2.0.0.0</AssemblyVersion>
271 <AssemblyVersion>4.0.0.0</AssemblyVersion>
274 <Member MemberName="op_Explicit">
275 <MemberSignature Language="C#" Value="public static UIntPtr op_Explicit (uint value);" />
276 <MemberType>Method</MemberType>
278 <ReturnType>System.UIntPtr</ReturnType>
281 <Parameter Name="value" Type="System.UInt32" />
284 <param name="value">To be added.</param>
285 <summary>To be added.</summary>
286 <returns>To be added.</returns>
287 <remarks>To be added.</remarks>
290 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
291 <AssemblyVersion>2.0.0.0</AssemblyVersion>
292 <AssemblyVersion>4.0.0.0</AssemblyVersion>
295 <Member MemberName="op_Explicit">
296 <MemberSignature Language="C#" Value="public static UIntPtr op_Explicit (ulong value);" />
297 <MemberType>Method</MemberType>
299 <ReturnType>System.UIntPtr</ReturnType>
302 <Parameter Name="value" Type="System.UInt64" />
305 <param name="value">To be added.</param>
306 <summary>To be added.</summary>
307 <returns>To be added.</returns>
308 <remarks>To be added.</remarks>
311 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
312 <AssemblyVersion>2.0.0.0</AssemblyVersion>
313 <AssemblyVersion>4.0.0.0</AssemblyVersion>
316 <Member MemberName="op_Explicit">
317 <MemberSignature Language="C#" Value="public static uint op_Explicit (UIntPtr value);" />
318 <MemberType>Method</MemberType>
320 <ReturnType>System.UInt32</ReturnType>
323 <Parameter Name="value" Type="System.UIntPtr" />
326 <param name="value">To be added.</param>
327 <summary>To be added.</summary>
328 <returns>To be added.</returns>
329 <remarks>To be added.</remarks>
332 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
333 <AssemblyVersion>2.0.0.0</AssemblyVersion>
334 <AssemblyVersion>4.0.0.0</AssemblyVersion>
337 <Member MemberName="op_Explicit">
338 <MemberSignature Language="C#" Value="public static ulong op_Explicit (UIntPtr value);" />
339 <MemberType>Method</MemberType>
341 <ReturnType>System.UInt64</ReturnType>
344 <Parameter Name="value" Type="System.UIntPtr" />
347 <param name="value">To be added.</param>
348 <summary>To be added.</summary>
349 <returns>To be added.</returns>
350 <remarks>To be added.</remarks>
353 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
354 <AssemblyVersion>2.0.0.0</AssemblyVersion>
355 <AssemblyVersion>4.0.0.0</AssemblyVersion>
358 <Member MemberName="op_Explicit">
359 <MemberSignature Language="C#" Value="public static void* op_Explicit (UIntPtr value);" />
360 <MemberType>Method</MemberType>
362 <ReturnType>System.Void*</ReturnType>
365 <Parameter Name="value" Type="System.UIntPtr" />
368 <param name="value">To be added.</param>
369 <summary>To be added.</summary>
370 <returns>To be added.</returns>
371 <remarks>To be added.</remarks>
374 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
375 <AssemblyVersion>2.0.0.0</AssemblyVersion>
376 <AssemblyVersion>4.0.0.0</AssemblyVersion>
380 <AttributeName>System.CLSCompliant(false)</AttributeName>
384 <Member MemberName="op_Explicit">
385 <MemberSignature Language="C#" Value="public static UIntPtr op_Explicit (void* value);" />
386 <MemberType>Method</MemberType>
388 <ReturnType>System.UIntPtr</ReturnType>
391 <Parameter Name="value" Type="System.Void*" />
394 <param name="value">To be added.</param>
395 <summary>To be added.</summary>
396 <returns>To be added.</returns>
397 <remarks>To be added.</remarks>
400 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
401 <AssemblyVersion>2.0.0.0</AssemblyVersion>
402 <AssemblyVersion>4.0.0.0</AssemblyVersion>
406 <AttributeName>System.CLSCompliant(false)</AttributeName>
410 <Member MemberName="op_Inequality">
411 <MemberSignature Language="ILASM" Value=".method public hidebysig static specialname bool op_Inequality(valuetype System.UIntPtr value1, valuetype System.UIntPtr value2)" />
412 <MemberSignature Language="C#" Value="public static bool op_Inequality (UIntPtr value1, UIntPtr value2);" />
413 <MemberType>Method</MemberType>
415 <ReturnType>System.Boolean</ReturnType>
418 <Parameter Name="value1" Type="System.UIntPtr" />
419 <Parameter Name="value2" Type="System.UIntPtr" />
422 <param name="value1">The first <see cref="T:System.UIntPtr" /> to compare for inequality.</param>
423 <param name="value2">The second <see cref="T:System.UIntPtr" /> to compare for inequality.</param>
424 <param name="value2">To be added.</param>
426 <para>Determines whether two specified instances of <see cref="T:System.UIntPtr" /> represent different values.</para>
430 <see langword="true" /> if <paramref name="value1" /> represents a different value than
431 <paramref name="value2" />; otherwise, <see langword="false" />.</para>
433 <remarks>To be added.</remarks>
434 <altmember cref="M:System.UIntPtr.Equals(System.Object)" />
436 <Excluded>0</Excluded>
438 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
439 <AssemblyVersion>2.0.0.0</AssemblyVersion>
440 <AssemblyVersion>4.0.0.0</AssemblyVersion>
443 <Member MemberName="op_Subtraction">
444 <MemberSignature Language="C#" Value="public static UIntPtr op_Subtraction (UIntPtr pointer, int offset);" />
445 <MemberType>Method</MemberType>
447 <AssemblyVersion>4.0.0.0</AssemblyVersion>
450 <ReturnType>System.UIntPtr</ReturnType>
453 <Parameter Name="pointer" Type="System.UIntPtr" />
454 <Parameter Name="offset" Type="System.Int32" />
457 <param name="pointer">To be added.</param>
458 <param name="offset">To be added.</param>
459 <summary>To be added.</summary>
460 <returns>To be added.</returns>
461 <remarks>To be added.</remarks>
464 <Member MemberName="Size">
465 <MemberSignature Language="ILASM" Value=".property int32 Size { public hidebysig static specialname int32 get_Size() }" />
466 <MemberSignature Language="C#" Value="public static int Size { get; }" />
467 <MemberType>Property</MemberType>
469 <ReturnType>System.Int32</ReturnType>
472 <MemberValue>4</MemberValue>
475 <para>Gets the size in bytes of a pointer or a handle for the current
476 implementation.</para>
479 <para>A <see cref="T:System.Int32" /> containing the
480 number of bytes of a pointer or handle for the current implementation. The value
481 of this property is equal to the number of bytes contained by the <see langword="native unsigned int" /> type in the current implementation. </para>
484 <para>This property is read-only.</para>
485 <para>For more information on the
486 <see langword="native unsigned int" /> type, see Partition II of the CLI
487 Specification.</para>
490 <Excluded>0</Excluded>
492 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
493 <AssemblyVersion>2.0.0.0</AssemblyVersion>
494 <AssemblyVersion>4.0.0.0</AssemblyVersion>
497 <Member MemberName="Subtract">
498 <MemberSignature Language="C#" Value="public static UIntPtr Subtract (UIntPtr pointer, int offset);" />
499 <MemberType>Method</MemberType>
501 <AssemblyVersion>4.0.0.0</AssemblyVersion>
504 <ReturnType>System.UIntPtr</ReturnType>
507 <Parameter Name="pointer" Type="System.UIntPtr" />
508 <Parameter Name="offset" Type="System.Int32" />
511 <param name="pointer">To be added.</param>
512 <param name="offset">To be added.</param>
513 <summary>To be added.</summary>
514 <returns>To be added.</returns>
515 <remarks>To be added.</remarks>
518 <Member MemberName="System.Runtime.Serialization.ISerializable.GetObjectData">
519 <MemberSignature Language="C#" Value="void ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
520 <MemberType>Method</MemberType>
522 <ReturnType>System.Void</ReturnType>
525 <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
526 <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
529 <param name="info">To be added.</param>
530 <param name="context">To be added.</param>
531 <summary>To be added.</summary>
532 <remarks>To be added.</remarks>
535 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
536 <AssemblyVersion>2.0.0.0</AssemblyVersion>
537 <AssemblyVersion>4.0.0.0</AssemblyVersion>
540 <Member MemberName="ToPointer">
541 <MemberSignature Language="ILASM" Value=".method public hidebysig instance class System.Void* ToPointer()" />
542 <MemberSignature Language="C#" Value="public void* ToPointer ();" />
543 <MemberType>Method</MemberType>
545 <ReturnType>System.Void*</ReturnType>
550 <para>Converts the value of the current instance to a pointer to
551 <see langword="void" />.</para>
554 <para>A pointer to <see langword="void" />. </para>
558 <block subset="none" type="note">A pointer to <see langword="void" />
559 points to memory containing data of an unspecified type.</block>
561 <para>This method is not CLS-compliant. For a CLS-compliant
562 alternative use <see cref="M:System.IntPtr.ToPointer" />.</para>
565 <Excluded>0</Excluded>
567 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
568 <AssemblyVersion>2.0.0.0</AssemblyVersion>
569 <AssemblyVersion>4.0.0.0</AssemblyVersion>
573 <AttributeName>System.CLSCompliant(false)</AttributeName>
577 <Member MemberName="ToString">
578 <MemberSignature Language="ILASM" Value=".method public hidebysig virtual string ToString()" />
579 <MemberSignature Language="C#" Value="public override string ToString ();" />
580 <MemberType>Method</MemberType>
582 <ReturnType>System.String</ReturnType>
587 <para>Returns a <see cref="T:System.String" /> representation of the value of the current
591 <para>A <see cref="T:System.String" />
592 representation of the current instance.</para>
595 <block subset="none" type="note">
596 <para> If <see cref="P:System.UIntPtr.Size" /> for the
597 current instance is 4, <see cref="M:System.UIntPtr.ToString" qualify="true" /> is
598 equivalent to <see cref="M:System.UInt32.ToString" qualify="true" />();
599 otherwise, this method is equivalent to<see cref="M:System.UInt64.ToString" qualify="true" />().</para>
600 <para>This method overrides <see cref="M:System.Object.ToString" qualify="true" />.</para>
604 <Excluded>0</Excluded>
606 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
607 <AssemblyVersion>2.0.0.0</AssemblyVersion>
608 <AssemblyVersion>4.0.0.0</AssemblyVersion>
611 <Member MemberName="ToUInt32">
612 <MemberSignature Language="ILASM" Value=".method public hidebysig instance unsigned int32 ToUInt32()" />
613 <MemberSignature Language="C#" Value="public uint ToUInt32 ();" />
614 <MemberType>Method</MemberType>
616 <ReturnType>System.UInt32</ReturnType>
621 <para>Converts the value of the current instance to a <see cref="T:System.UInt32" />.</para>
624 <para>A <see cref="T:System.UInt32" /> containing the
625 same value as the current instance.</para>
627 <remarks>To be added.</remarks>
628 <exception cref="T:System.OverflowException">The current platform is not a 32-bit platform and the value of the current instance is greater than <see cref="F:System.UInt32.MaxValue" /> .</exception>
630 <Excluded>0</Excluded>
632 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
633 <AssemblyVersion>2.0.0.0</AssemblyVersion>
634 <AssemblyVersion>4.0.0.0</AssemblyVersion>
637 <Member MemberName="ToUInt64">
638 <MemberSignature Language="ILASM" Value=".method public hidebysig instance unsigned int64 ToUInt64()" />
639 <MemberSignature Language="C#" Value="public ulong ToUInt64 ();" />
640 <MemberType>Method</MemberType>
642 <ReturnType>System.UInt64</ReturnType>
647 <para>Converts the value of the current instance to a <see cref="T:System.UInt64" />.</para>
650 <para>A <see cref="T:System.UInt64" /> containing the
651 same value as the current instance.</para>
653 <remarks>To be added.</remarks>
655 <Excluded>0</Excluded>
657 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
658 <AssemblyVersion>2.0.0.0</AssemblyVersion>
659 <AssemblyVersion>4.0.0.0</AssemblyVersion>
662 <Member MemberName="Zero">
663 <MemberSignature Language="ILASM" Value=".field public static initOnly valuetype System.UIntPtr Zero" />
664 <MemberSignature Language="C#" Value="public static readonly UIntPtr Zero;" />
665 <MemberType>Field</MemberType>
667 <ReturnType>System.UIntPtr</ReturnType>
670 <MemberValue>0</MemberValue>
673 <para>Represents a pointer or handle that has been initialized as zero.</para>
676 <block subset="none" type="note">
677 <para>The value of this field is not <see langword="null" /> , but is instead a
678 pointer which has been assigned the value zero. Use this field to efficiently
679 determine whether an instance of <see cref="T:System.UIntPtr" /> has been set to a value other than zero. For example, if
680 <paramref name="uip" /> is a <see cref="T:System.UIntPtr" /> instance, using <paramref name="uip != UIntPtr.Zero" /> is more
681 efficient than <paramref name="uip != new UIntPtr(0)" /> to test if <paramref name="uip" /> has been set
682 to a value other than zero. </para>
686 <Excluded>0</Excluded>
688 <AssemblyVersion>1.0.5000.0</AssemblyVersion>
689 <AssemblyVersion>2.0.0.0</AssemblyVersion>
690 <AssemblyVersion>4.0.0.0</AssemblyVersion>
694 <TypeExcluded>0</TypeExcluded>