10 instantiations of UIntPtr
Microsoft.CodeAnalysis.CSharp (1)
Binder\SwitchBinder.cs (1)
298return new System.UIntPtr(constantValue.UInt32Value);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Windows\WindowsContainerSnapshotProviderTests.cs (2)
67_limitInfo.JobMemoryLimit = new UIntPtr(2000); 169_limitInfo.JobMemoryLimit = new UIntPtr(0);
PresentationCore (1)
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (1)
2193UIntPtr hWndUIntPtr = new UIntPtr(hWnd.ToPointer());
System.Formats.Nrbf (2)
System\Formats\Nrbf\ClassWithIdRecord.cs (1)
68MemberPrimitiveTypedRecord<UIntPtr> => Create(new UIntPtr(reader.ReadUInt64())),
System\Formats\Nrbf\SystemClassWithMembersAndTypesRecord.cs (1)
69(PrimitiveType.UInt64, "System.UIntPtr", "value") => Create(new UIntPtr(reader.ReadUInt64())),
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.cs (1)
236UIntPtr numBytes = new UIntPtr(segmentSize);
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
42SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE));
MS\Internal\AutomationProxies\Misc.cs (2)
578memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE); 581VirtualAlloc(new IntPtr((byte *)memAddr.ToPointer() + cbSize - pageSize), new UIntPtr(pageSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_NOACCESS);
321 references to UIntPtr
GenerateDocumentationAndConfigFiles (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Metrics (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Metrics.Legacy (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.AspNetCore.Server.HttpSys (4)
Windows.Win32.HANDLE.g.cs (1)
59 public static explicit operator HANDLE(UIntPtr value) => new HANDLE((void*)value.ToPointer());
Windows.Win32.HLOCAL.g.cs (1)
59 public static explicit operator HLOCAL(UIntPtr value) => new HLOCAL((void*)value.ToPointer());
Windows.Win32.PSECURITY_DESCRIPTOR.g.cs (1)
59 public static explicit operator PSECURITY_DESCRIPTOR(UIntPtr value) => new PSECURITY_DESCRIPTOR((void*)value.ToPointer());
Windows.Win32.PSID.g.cs (1)
59 public static explicit operator PSID(UIntPtr value) => new PSID((void*)value.ToPointer());
Microsoft.AspNetCore.Server.IIS (1)
Windows.Win32.HANDLE.g.cs (1)
59 public static explicit operator HANDLE(UIntPtr value) => new HANDLE((void*)value.ToPointer());
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (6)
ProcessTracker.cs (6)
95public UIntPtr MinimumWorkingSetSize; 96public UIntPtr MaximumWorkingSetSize; 125public UIntPtr ProcessMemoryLimit; 126public UIntPtr JobMemoryLimit; 127public UIntPtr PeakProcessMemoryUsed; 128public UIntPtr PeakJobMemoryUsed;
Microsoft.AspNetCore.Shared.Tests (2)
Windows.Win32.HANDLE.g.cs (1)
59 public static explicit operator HANDLE(UIntPtr value) => new HANDLE((void*)value.ToPointer());
Windows.Win32.PSECURITY_DESCRIPTOR.g.cs (1)
59 public static explicit operator PSECURITY_DESCRIPTOR(UIntPtr value) => new PSECURITY_DESCRIPTOR((void*)value.ToPointer());
Microsoft.Build.Framework (3)
NativeMethods.cs (3)
356public UIntPtr AffinityMask; 358public UIntPtr UniqueProcessId; 359public UIntPtr InheritedFromUniqueProcessId;
Microsoft.CodeAnalysis (8)
CodeGen\MetadataConstant.cs (1)
34Debug.Assert(value == null || value is string || value is DateTime || value is decimal || value.GetType().GetTypeInfo().IsEnum || (value.GetType().GetTypeInfo().IsPrimitive && !(value is IntPtr) && !(value is UIntPtr)));
SpecialType.cs (1)
136/// Indicates that the type is <see cref="UIntPtr"/>.
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Symbols\INamedTypeSymbol.cs (1)
196/// either <see cref="System.IntPtr"/> or <see cref="System.UIntPtr"/>.
Symbols\TypedConstantValue.cs (1)
25Debug.Assert(value == null || value is string || value.GetType().GetTypeInfo().IsEnum || (value.GetType().GetTypeInfo().IsPrimitive && !(value is System.IntPtr) && !(value is System.UIntPtr)) || value is ITypeSymbol);
Microsoft.CodeAnalysis.Analyzers (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.CodeStyle (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.Collections.Package (4)
Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.CSharp (1)
Symbols\NamedTypeSymbol.cs (1)
1905/// either <see cref="System.IntPtr"/> or <see cref="System.UIntPtr"/>.
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
508/// Returns whether or not <see cref="IntPtr"/> and <see cref="UIntPtr"/> are exactly identical to <see
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
508/// Returns whether or not <see cref="IntPtr"/> and <see cref="UIntPtr"/> are exactly identical to <see
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
src\Compilers\Core\Portable\SpecialType.cs (1)
136/// Indicates that the type is <see cref="UIntPtr"/>.
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.Values.cs (3)
140if (UIntPtr.Size == 8) 142var uIntPtr = ((UIntPtr)value.HostObjectValue).ToUInt64(); 147var uIntPtr = ((UIntPtr)value.HostObjectValue).ToUInt32();
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (3)
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.Values.cs (3)
140if (UIntPtr.Size == 8) 142var uIntPtr = ((UIntPtr)value.HostObjectValue).ToUInt64(); 147var uIntPtr = ((UIntPtr)value.HostObjectValue).ToUInt32();
Microsoft.CodeAnalysis.Extensions.Package (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.InteractiveHost (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.Threading.Package (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.Workspaces (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
144new PredefinedTypeInfo(PredefinedType.PT_UINTPTR, typeof(UIntPtr), "System.UIntPtr", FUNDTYPE.FT_STRUCT),
Microsoft.DotNet.XUnitAssert.Tests (1)
Sdk\ArgumentFormatterTests.cs (1)
220 { typeof(UIntPtr), "typeof(nuint)" },
Microsoft.Extensions.Diagnostics.ResourceMonitoring (10)
Windows\Interop\JobObjectInfo.cs (7)
86public UIntPtr MinimumWorkingSetSize; 89public UIntPtr MaximumWorkingSetSize; 95public UIntPtr Affinity; 117public UIntPtr ProcessMemoryLimit; 120public UIntPtr JobMemoryLimit; 123public UIntPtr PeakProcessMemoryUsed; 126public UIntPtr PeakJobMemoryUsed;
Windows\Interop\SYSTEM_INFO.cs (3)
18public UIntPtr MinimumApplicationAddress; 19public UIntPtr MaximumApplicationAddress; 20public UIntPtr ActiveProcessorMask;
Microsoft.ML.Vision (8)
ImageClassificationTrainer.cs (8)
1518public UIntPtr length; 1519public UIntPtr capacity; 1528private static extern unsafe void TF_StringCopy(TF_TString* dst, byte* src, UIntPtr size); 1537public delegate void TF_Deallocator(IntPtr data, UIntPtr length, IntPtr arg); 1540public static void Deallocator(IntPtr data, UIntPtr length, IntPtr arg) 1562TF_StringCopy(tstring, src, (UIntPtr)data.Length); 1572(UIntPtr)sizeOfTString, 1584IntPtr data, UIntPtr len,
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1218[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UIntPtr))]
netstandard (1)
netstandard.cs (1)
2219[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UIntPtr))]
PresentationCore (1)
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (1)
2193UIntPtr hWndUIntPtr = new UIntPtr(hWnd.ToPointer());
Roslyn.Diagnostics.Analyzers (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
508/// Returns whether or not <see cref="IntPtr"/> and <see cref="UIntPtr"/> are exactly identical to <see
System.Formats.Nrbf (2)
System\Formats\Nrbf\ClassWithIdRecord.cs (1)
68MemberPrimitiveTypedRecord<UIntPtr> => Create(new UIntPtr(reader.ReadUInt64())),
System\Formats\Nrbf\Utils\TypeNameHelpers.cs (1)
104else if (typeof(T) == typeof(UIntPtr))
System.IO.MemoryMappedFiles (4)
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (2)
130public unsafe void Flush(UIntPtr capacity) 132if (capacity == UIntPtr.Zero)
System\IO\MemoryMappedFiles\MemoryMappedViewAccessor.cs (1)
67_view.Flush((UIntPtr)Capacity);
System\IO\MemoryMappedFiles\MemoryMappedViewStream.cs (1)
67_view.Flush((UIntPtr)Capacity);
System.Net.Ping (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.IOVector.cs (1)
15public UIntPtr Count;
System.Net.Sockets (7)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.IOVector.cs (1)
15public UIntPtr Count;
System\Net\Sockets\SocketPal.Unix.cs (6)
155Count = (UIntPtr)buffer.Length 254Count = (UIntPtr)count 314iovecs[i].Count = (UIntPtr)(buffer.Count - startOffset); 428iovecs[i].Count = (UIntPtr)bufferCount; 498Count = (UIntPtr)buffer.Length 567iovecs[i].Count = (UIntPtr)buffer.Count;
System.Private.CoreLib (89)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (16)
22internal static UIntPtr MaxSP 26return (UIntPtr)(void*)(-1); 257UIntPtr sp, ref ExInfo exInfo, 465internal UIntPtr FP; 502_notifyDebuggerSP = UIntPtr.Zero; 515_notifyDebuggerSP = UIntPtr.Zero; 551internal volatile UIntPtr _notifyDebuggerSP; 557internal volatile UIntPtr _handlingFrameSP; 738UIntPtr handlingFrameSP = MaxSP; 748UIntPtr prevFramePtr = UIntPtr.Zero; 941private static void DebugScanCallFrame(int passNumber, byte* ip, UIntPtr sp) 947private static void DebugVerifyHandlingFrame(UIntPtr handlingFrameSP) 970private static void UpdateStackTrace(object exceptionObj, UIntPtr curFramePtr, IntPtr ip, UIntPtr sp, 971ref bool isFirstRethrowFrame, ref UIntPtr prevFramePtr, ref bool isFirstFrame, ref ExInfo exInfo)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\StackFrameIterator.cs (3)
16internal UIntPtr SP; 36internal UIntPtr SP { get { return _pRegDisplay->SP; } } 37internal UIntPtr FramePointer { get { return _pRegDisplay->m_pCurrentContext->FP; } }
src\libraries\Common\src\Interop\Unix\System.Native\Interop.IOVector.cs (1)
15public UIntPtr Count;
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (1)
2665typeof(T) == typeof(UIntPtr))
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (2)
1237(source == typeof(UIntPtr) && target == typeof(UIntPtr)))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (3)
540else if (type == typeof(UIntPtr)) 664if (parameterType == typeof(UIntPtr)) 665return UIntPtr.Size == 4 ? TypeCode.UInt32 : TypeCode.UInt64;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (7)
47public UIntPtr AsUIntPtr; 94private PropertyValue(UIntPtr value) : this(new Scalar() { AsUIntPtr = value }, sizeof(UIntPtr)) { } 116if (type == typeof(UIntPtr)) return value => new PropertyValue((UIntPtr)value!); 241if (type == typeof(UIntPtr)) { var f = GetGetMethod<UIntPtr>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); }
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleTypeInfos.cs (2)
92public static TraceLoggingTypeInfo UIntPtr() => s_uintptr ??= new ScalarTypeInfo(typeof(UIntPtr), Statics.UIntPtrType); 153public static TraceLoggingTypeInfo UIntPtr() => s_uintptr ??= new ScalarArrayTypeInfo(typeof(UIntPtr[]), Statics.UIntPtrType, System.IntPtr.Size);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (2)
467else if (elementType == typeof(UIntPtr)) 549else if (dataType == typeof(UIntPtr))
src\libraries\System.Private.CoreLib\src\System\Enum.cs (2)
1181CorElementType.ELEMENT_TYPE_U => Unsafe.As<byte, UIntPtr>(ref data), 1272CorElementType.ELEMENT_TYPE_U => Unsafe.As<byte, UIntPtr>(ref data).GetHashCode(),
src\libraries\System.Private.CoreLib\src\System\Half.cs (5)
958/// <summary>Explicitly converts a half-precision floating-point value to its nearest representable <see cref="UIntPtr" /> value.</summary> 960/// <returns><paramref name="value" /> converted to its nearest representable <see cref="UIntPtr" /> value.</returns> 964/// <summary>Explicitly converts a half-precision floating-point value to its nearest representable <see cref="UIntPtr" /> value, throwing an overflow exception for any values that fall outside the representable range.</summary> 966/// <returns><paramref name="value" /> converted to its nearest representable <see cref="UIntPtr" /> value.</returns> 967/// <exception cref="OverflowException"><paramref name="value" /> is not representable by <see cref="UIntPtr" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Int128.cs (5)
444/// <summary>Explicitly converts a 128-bit signed integer to a <see cref="UIntPtr" /> value.</summary> 446/// <returns><paramref name="value" /> converted to a <see cref="UIntPtr" />.</returns> 450/// <summary>Explicitly converts a 128-bit signed integer to a <see cref="UIntPtr" /> value, throwing an overflow exception for any values that fall outside the representable range.</summary> 452/// <returns><paramref name="value" /> converted to a <see cref="UIntPtr" />.</returns> 656/// <summary>Implicitly converts a <see cref="UIntPtr" /> value to a 128-bit signed integer.</summary>
src\libraries\System.Private.CoreLib\src\System\IO\RandomAccess.Unix.cs (3)
74vectors[i] = new Interop.Sys.IOVector { Base = (byte*)memoryHandle.Pointer, Count = (UIntPtr)buffer.Length }; 183vectors[i] = new Interop.Sys.IOVector { Base = (byte*)memoryHandle.Pointer, Count = (UIntPtr)buffer.Length }; 227Count = current.Count - (UIntPtr)(bytesWritten)
src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (5)
799/// <summary>Explicitly converts a <see cref="BFloat16" /> value to its nearest representable <see cref="UIntPtr" /> value.</summary> 801/// <returns><paramref name="value" /> converted to its nearest representable <see cref="UIntPtr" /> value.</returns> 805/// <summary>Explicitly converts a <see cref="BFloat16" /> value to its nearest representable <see cref="UIntPtr" /> value, throwing an overflow exception for any values that fall outside the representable range.</summary> 807/// <returns><paramref name="value" /> converted to its nearest representable <see cref="UIntPtr" /> value.</returns> 808/// <exception cref="OverflowException"><paramref name="value" /> is not representable by <see cref="UIntPtr" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (2)
418fieldType == typeof(UIntPtr)) 445fieldType == typeof(UIntPtr))
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (1)
114if (srcObject is IntPtr or UIntPtr)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeFeature.cs (1)
48/// Indicates that this version of runtime supports <see cref="System.IntPtr" /> and <see cref="System.UIntPtr" /> as numeric types.
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CULong.cs (4)
11using NativeType = System.UIntPtr; 27private readonly NativeType _value; 35_value = (NativeType)value; 45_value = checked((NativeType)value);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (6)
436/// <summary>Explicitly converts a native-sized floating-point value to its nearest representable <see cref="UIntPtr" /> value.</summary> 438/// <returns><paramref name="value" /> converted to its nearest representable <see cref="UIntPtr" /> value.</returns> 443/// <summary>Explicitly converts a native-sized floating-point value to its nearest representable <see cref="UIntPtr" /> value, throwing an overflow exception for any values that fall outside the representable range.</summary> 445/// <returns><paramref name="value" /> converted to its nearest representable <see cref="UIntPtr" /> value.</returns> 446/// <exception cref="OverflowException"><paramref name="value" /> is not representable by <see cref="UIntPtr" />.</exception> 552/// <summary>Implicitly converts a <see cref="System.UIntPtr" /> value to its nearest representable native-sized floating-point value.</summary>
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.cs (1)
236UIntPtr numBytes = new UIntPtr(segmentSize);
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.Unix.cs (1)
35private static void GrowPageFileIfNecessaryAndPossible(UIntPtr numBytes)
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (2)
635if (UIntPtr.Size == sizeof(ulong)) 1191if (UIntPtr.Size == sizeof(ulong))
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (5)
467/// <summary>Explicitly converts a 128-bit unsigned integer to a <see cref="UIntPtr" /> value.</summary> 469/// <returns><paramref name="value" /> converted to a <see cref="UIntPtr" />.</returns> 473/// <summary>Explicitly converts a 128-bit unsigned integer to a <see cref="UIntPtr" /> value, throwing an overflow exception for any values that fall outside the representable range.</summary> 475/// <returns><paramref name="value" /> converted to a <see cref="UIntPtr" />.</returns> 731/// <summary>Implicitly converts a <see cref="UIntPtr" /> value to a 128-bit unsigned integer.</summary>
src\System\Exception.CoreCLR.cs (4)
95_ipForWatsonBuckets = UIntPtr.Zero; 177private UIntPtr _ipForWatsonBuckets; // Used to persist the IP for Watson Bucketing 223public readonly UIntPtr IpForWatsonBuckets; 229UIntPtr ipForWatsonBuckets,
src\System\Reflection\Emit\CustomAttributeBuilder.cs (2)
246return t != typeof(IntPtr) && t != typeof(UIntPtr); 273if (passedType == typeof(IntPtr) || passedType == typeof(UIntPtr))
src\System\Runtime\ExceptionServices\InternalCalls.cs (1)
34internal static unsafe partial void RhpAppendExceptionStackFrame(ObjectHandleOnStack exceptionObj, IntPtr ip, UIntPtr sp, int flags, EH.ExInfo* exInfo);
src\System\StubHelpers.cs (1)
1056else if (elementType == typeof(UIntPtr))
src\System\TypedReference.CoreCLR.cs (1)
40? TypeHandle.TypeHandleOf<UIntPtr>().AsMethodTable()
System.Private.Windows.Core (23)
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (2)
53{ TypeName.Parse(Types.UIntPtrType), typeof(UIntPtr) }, 121|| type == typeof(UIntPtr)
Windows.Win32.BSTR.g.cs (1)
56 public static explicit operator BSTR(UIntPtr value) => new BSTR((char*)value.ToPointer());
Windows.Win32.HANDLE.g.cs (1)
59 public static explicit operator HANDLE(UIntPtr value) => new HANDLE((void*)value.ToPointer());
Windows.Win32.HBITMAP.g.cs (1)
59 public static explicit operator HBITMAP(UIntPtr value) => new HBITMAP((void*)value.ToPointer());
Windows.Win32.HBRUSH.g.cs (1)
59 public static explicit operator HBRUSH(UIntPtr value) => new HBRUSH((void*)value.ToPointer());
Windows.Win32.HCURSOR.g.cs (1)
59 public static explicit operator HCURSOR(UIntPtr value) => new HCURSOR((void*)value.ToPointer());
Windows.Win32.HDC.g.cs (1)
59 public static explicit operator HDC(UIntPtr value) => new HDC((void*)value.ToPointer());
Windows.Win32.HDROP.g.cs (1)
59 public static explicit operator HDROP(UIntPtr value) => new HDROP((void*)value.ToPointer());
Windows.Win32.HENHMETAFILE.g.cs (1)
59 public static explicit operator HENHMETAFILE(UIntPtr value) => new HENHMETAFILE((void*)value.ToPointer());
Windows.Win32.HFONT.g.cs (1)
59 public static explicit operator HFONT(UIntPtr value) => new HFONT((void*)value.ToPointer());
Windows.Win32.HGDIOBJ.g.cs (1)
59 public static explicit operator HGDIOBJ(UIntPtr value) => new HGDIOBJ((void*)value.ToPointer());
Windows.Win32.HGLOBAL.g.cs (1)
59 public static explicit operator HGLOBAL(UIntPtr value) => new HGLOBAL((void*)value.ToPointer());
Windows.Win32.HICON.g.cs (1)
59 public static explicit operator HICON(UIntPtr value) => new HICON((void*)value.ToPointer());
Windows.Win32.HINSTANCE.g.cs (1)
59 public static explicit operator HINSTANCE(UIntPtr value) => new HINSTANCE((void*)value.ToPointer());
Windows.Win32.HMETAFILE.g.cs (1)
59 public static explicit operator HMETAFILE(UIntPtr value) => new HMETAFILE((void*)value.ToPointer());
Windows.Win32.HMODULE.g.cs (1)
59 public static explicit operator HMODULE(UIntPtr value) => new HMODULE((void*)value.ToPointer());
Windows.Win32.HMONITOR.g.cs (1)
59 public static explicit operator HMONITOR(UIntPtr value) => new HMONITOR((void*)value.ToPointer());
Windows.Win32.HPALETTE.g.cs (1)
59 public static explicit operator HPALETTE(UIntPtr value) => new HPALETTE((void*)value.ToPointer());
Windows.Win32.HPEN.g.cs (1)
59 public static explicit operator HPEN(UIntPtr value) => new HPEN((void*)value.ToPointer());
Windows.Win32.HPROPSHEETPAGE.g.cs (1)
59 public static explicit operator HPROPSHEETPAGE(UIntPtr value) => new HPROPSHEETPAGE((void*)value.ToPointer());
Windows.Win32.HRGN.g.cs (1)
59 public static explicit operator HRGN(UIntPtr value) => new HRGN((void*)value.ToPointer());
Windows.Win32.HWND.g.cs (1)
59 public static explicit operator HWND(UIntPtr value) => new HWND((void*)value.ToPointer());
System.Reflection.Metadata (2)
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (1)
982/// Encodes <see cref="System.UIntPtr"/>.
System\Reflection\Metadata\Signatures\SignatureTypeCode.cs (1)
130/// Represents a <see cref="System.UIntPtr"/> in signatures.
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net11.0\System.Runtime.Forwards.cs (1)
879[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UIntPtr))]
System.Runtime.Numerics (4)
System\Numerics\BigInteger.cs (3)
2143/// <summary>Explicitly converts a big integer to a <see cref="UIntPtr" /> value.</summary> 2145/// <returns><paramref name="value" /> converted to <see cref="UIntPtr" /> value.</returns> 2383/// <summary>Implicitly converts a <see cref="UIntPtr" /> value to a big integer.</summary>
System\Numerics\Complex.cs (1)
897/// <summary>Implicitly converts a <see cref="UIntPtr" /> value to a double-precision complex number.</summary>
System.Text.Json (1)
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverterFactory.cs (1)
28type == typeof(UIntPtr) ||
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
271public INamedTypeSymbol? UIntPtrType => GetOrResolveType(typeof(UIntPtr), ref _UIntPtrType);
System.Windows.Forms (9)
System\Windows\Forms\Application.ComponentManager.cs (2)
32private UIntPtr _cookieCounter = UIntPtr.Zero;
System\Windows\Forms\Application.ComponentThreadContext.cs (1)
139UIntPtr id;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarButtonAccessibleObject.cs (1)
133mouseInput.Anonymous.mi.dwExtraInfo = UIntPtr.Zero;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (1)
299cchName = (UIntPtr)name.Length - 1
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
2889es.dwCookie = (UIntPtr)cookieVal; 2993es.dwCookie = (UIntPtr)cookieVal;
System\Windows\Forms\SendKeys\SendKeys.cs (2)
647currentInput[0].Anonymous.ki.dwExtraInfo = UIntPtr.Zero; 649currentInput[1].Anonymous.ki.dwExtraInfo = UIntPtr.Zero;
System.Windows.Forms.Primitives (15)
Interop\Richedit\Interop.EDITSTREAM.cs (1)
13public UIntPtr dwCookie;
System\Windows\Forms\Automation\UiaTextProvider.cs (1)
144keyboardInput.Anonymous.ki.dwExtraInfo = UIntPtr.Zero;
Windows.Win32.DPI_AWARENESS_CONTEXT.g.cs (1)
59 public static explicit operator DPI_AWARENESS_CONTEXT(UIntPtr value) => new DPI_AWARENESS_CONTEXT((void*)value.ToPointer());
Windows.Win32.HACCEL.g.cs (1)
59 public static explicit operator HACCEL(UIntPtr value) => new HACCEL((void*)value.ToPointer());
Windows.Win32.HDESK.g.cs (1)
59 public static explicit operator HDESK(UIntPtr value) => new HDESK((void*)value.ToPointer());
Windows.Win32.HHOOK.g.cs (1)
59 public static explicit operator HHOOK(UIntPtr value) => new HHOOK((void*)value.ToPointer());
Windows.Win32.HIMC.g.cs (1)
59 public static explicit operator HIMC(UIntPtr value) => new HIMC((void*)value.ToPointer());
Windows.Win32.HKEY.g.cs (1)
59 public static explicit operator HKEY(UIntPtr value) => new HKEY((void*)value.ToPointer());
Windows.Win32.HKL.g.cs (1)
59 public static explicit operator HKL(UIntPtr value) => new HKL((void*)value.ToPointer());
Windows.Win32.HMENU.g.cs (1)
59 public static explicit operator HMENU(UIntPtr value) => new HMENU((void*)value.ToPointer());
Windows.Win32.HTASK.g.cs (1)
59 public static explicit operator HTASK(UIntPtr value) => new HTASK((void*)value.ToPointer());
Windows.Win32.HWINEVENTHOOK.g.cs (1)
61 public static explicit operator HWINEVENTHOOK(UIntPtr value) => new HWINEVENTHOOK((void*)value.ToPointer());
Windows.Win32.HWINSTA.g.cs (1)
59 public static explicit operator HWINSTA(UIntPtr value) => new HWINSTA((void*)value.ToPointer());
Windows\Win32\PInvoke.SetTimer.cs (2)
8public static unsafe UIntPtr SetTimer<T>(T hWnd, nuint nIDEvent, uint uElapse) 11UIntPtr result = SetTimer(hWnd.Handle, nIDEvent, uElapse, lpTimerFunc: null);
System.Windows.Forms.Tests (17)
System\Windows\Forms\Application.ComponentManagerTests.cs (17)
47UIntPtr id = default; 51Assert.Equal(UIntPtr.Zero, id); 61UIntPtr id = default; 64Assert.Equal(UIntPtr.Zero, id); 75UIntPtr id = default; 78Assert.NotEqual(UIntPtr.Zero, id); 80UIntPtr newId = default; 82Assert.NotEqual(UIntPtr.Zero, newId); 95UIntPtr id = default; 97Assert.False(manager.FRevokeComponent(UIntPtr.Zero)); 111UIntPtr id = default; 125UIntPtr id = default; 156UIntPtr id = default; 189UIntPtr id = default; 220UIntPtr id = default; 309UIntPtr firstId = default; 312UIntPtr secondId = default;
Test.Utilities (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
Text.Analyzers (4)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(UIntPtr)) 651if (typeof(T) == typeof(UIntPtr)) 1168if (typeof(TKey) == typeof(UIntPtr)) 1202if (typeof(TKey) == typeof(UIntPtr))
UIAutomationClientSideProviders (10)
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
54return Misc.VirtualFreeEx(_processHandle, handle, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE);
MS\Internal\AutomationProxies\Misc.cs (5)
607VirtualFree(memAddr, UIntPtr.Zero, UnsafeNativeMethods.MEM_RELEASE); 1742internal static IntPtr VirtualAlloc(IntPtr address, UIntPtr size, int allocationType, int protect) 1755internal static IntPtr VirtualAllocEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int allocationType, int protect) 1768internal static bool VirtualFree(IntPtr address, UIntPtr size, int freeType) 1781internal static bool VirtualFreeEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int freeType)
MS\Win32\UnsafeNativeMethods.cs (4)
46internal static extern IntPtr VirtualAlloc(IntPtr address, UIntPtr size, int allocationType, int protect); 48internal static extern IntPtr VirtualAllocEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int allocationType, int protect); 50internal static extern bool VirtualFree(IntPtr address, UIntPtr size, int freeType); 52internal static extern bool VirtualFreeEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int freeType);
xunit.assert (1)
Sdk\ArgumentFormatter.cs (1)
116 { typeof(UIntPtr).GetTypeInfo(), "nuint" },