149 references to ToPointer
Microsoft.AspNetCore.Server.HttpSys (8)
_generated\46\Windows.Win32.HTTP_REQUEST_QUEUE_HANDLE.g.cs (1)
57 public static explicit operator HTTP_REQUEST_QUEUE_HANDLE(IntPtr value) => new HTTP_REQUEST_QUEUE_HANDLE((void*)value.ToPointer());
_generated\8\Windows.Win32.HANDLE.g.cs (1)
57 public static explicit operator HANDLE(IntPtr value) => new HANDLE((void*)value.ToPointer());
_generated\80\Windows.Win32.PSECURITY_DESCRIPTOR.g.cs (1)
57 public static explicit operator PSECURITY_DESCRIPTOR(IntPtr value) => new PSECURITY_DESCRIPTOR((void*)value.ToPointer());
_generated\81\Windows.Win32.PSID.g.cs (1)
57 public static explicit operator PSID(IntPtr value) => new PSID((void*)value.ToPointer());
_generated\9\Windows.Win32.HLOCAL.g.cs (1)
57 public static explicit operator HLOCAL(IntPtr value) => new HLOCAL((void*)value.ToPointer());
NativeInterop\RequestQueue.cs (1)
66lpSecurityDescriptor = pSecurityDescriptor.Value.ToPointer(),
NativeInterop\UrlGroup.cs (1)
121var statusCode = PInvoke.HttpSetUrlGroupProperty(Id, property, info.ToPointer(), infosize);
src\aspnetcore\src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
153return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.IIS (2)
_generated\7\Windows.Win32.HANDLE.g.cs (1)
57 public static explicit operator HANDLE(IntPtr value) => new HANDLE((void*)value.ToPointer());
src\aspnetcore\src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
153return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
153return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
153return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
153return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.CSharp (3)
src\runtime\src\libraries\Common\src\System\Runtime\InteropServices\ComEventsSink.cs (3)
129ref ComVariant pByRefVariant = ref *(ComVariant*)(pSrc.GetRawDataRef<nint>().ToPointer()); 164var vars = new Span<ComVariant>(pDispParams.rgvarg.ToPointer(), totalCount); 165var namedArgs = new Span<int>(pDispParams.rgdispidNamedArgs.ToPointer(), totalCount);
Microsoft.Diagnostics.DataContractReader.Legacy (3)
SOSDacImpl.cs (3)
4694void* tokenDebug = GCHandle.ToIntPtr(expectedHandle).ToPointer(); 4850void* tokenDebug = GCHandle.ToIntPtr(GCHandle.Alloc(expectedElements)).ToPointer(); 4910void* tokenDebug = GCHandle.ToIntPtr(expectedElementsHandle).ToPointer();
Microsoft.DiaSymReader (4)
SymUnmanagedFactory.cs (4)
159? ComInterfaceMarshaller<ISymUnmanagedReader>.ConvertToManaged(rawInstance.ToPointer()) 160: ComInterfaceMarshaller<ISymUnmanagedWriter5>.ConvertToManaged(rawInstance.ToPointer()); 239instance = ComInterfaceMarshaller<ISymUnmanagedReader>.ConvertToManaged(rawInstance.ToPointer()); 247instance = ComInterfaceMarshaller<ISymUnmanagedWriter5>.ConvertToManaged(rawInstance.ToPointer());
Microsoft.ML.ImageAnalytics (2)
MLImage.cs (2)
108imagePixelData.CopyTo(new Span<byte>(image.GetPixels().ToPointer(), image.Width * image.Height * 4)); 169return new ReadOnlySpan<byte>(pixelsPtr.ToPointer(), _image.ByteCount);
Microsoft.ML.LightGbm (2)
WrappedLightGbmDataset.cs (2)
61ptrArrayValues[i] = (double*)gcValues[i].AddrOfPinnedObject().ToPointer(); 63ptrArrayIndices[i] = (int*)gcIndices[i].AddrOfPinnedObject().ToPointer();
Microsoft.Private.Windows.Core (21)
_generated\10\Windows.Win32.BSTR.g.cs (1)
54 public static explicit operator BSTR(IntPtr value) => new BSTR((char*)value.ToPointer());
_generated\100\Windows.Win32.HBRUSH.g.cs (1)
57 public static explicit operator HBRUSH(IntPtr value) => new HBRUSH((void*)value.ToPointer());
_generated\101\Windows.Win32.HCURSOR.g.cs (1)
57 public static explicit operator HCURSOR(IntPtr value) => new HCURSOR((void*)value.ToPointer());
_generated\102\Windows.Win32.HDC.g.cs (1)
57 public static explicit operator HDC(IntPtr value) => new HDC((void*)value.ToPointer());
_generated\104\Windows.Win32.HDROP.g.cs (1)
57 public static explicit operator HDROP(IntPtr value) => new HDROP((void*)value.ToPointer());
_generated\105\Windows.Win32.HENHMETAFILE.g.cs (1)
57 public static explicit operator HENHMETAFILE(IntPtr value) => new HENHMETAFILE((void*)value.ToPointer());
_generated\106\Windows.Win32.HFONT.g.cs (1)
57 public static explicit operator HFONT(IntPtr value) => new HFONT((void*)value.ToPointer());
_generated\107\Windows.Win32.HGDIOBJ.g.cs (1)
57 public static explicit operator HGDIOBJ(IntPtr value) => new HGDIOBJ((void*)value.ToPointer());
_generated\108\Windows.Win32.HGLOBAL.g.cs (1)
57 public static explicit operator HGLOBAL(IntPtr value) => new HGLOBAL((void*)value.ToPointer());
_generated\109\Windows.Win32.HICON.g.cs (1)
57 public static explicit operator HICON(IntPtr value) => new HICON((void*)value.ToPointer());
_generated\112\Windows.Win32.HINSTANCE.g.cs (1)
57 public static explicit operator HINSTANCE(IntPtr value) => new HINSTANCE((void*)value.ToPointer());
_generated\113\Windows.Win32.HMETAFILE.g.cs (1)
57 public static explicit operator HMETAFILE(IntPtr value) => new HMETAFILE((void*)value.ToPointer());
_generated\114\Windows.Win32.HMODULE.g.cs (1)
57 public static explicit operator HMODULE(IntPtr value) => new HMODULE((void*)value.ToPointer());
_generated\115\Windows.Win32.HMONITOR.g.cs (1)
57 public static explicit operator HMONITOR(IntPtr value) => new HMONITOR((void*)value.ToPointer());
_generated\116\Windows.Win32.HPALETTE.g.cs (1)
57 public static explicit operator HPALETTE(IntPtr value) => new HPALETTE((void*)value.ToPointer());
_generated\117\Windows.Win32.HPEN.g.cs (1)
57 public static explicit operator HPEN(IntPtr value) => new HPEN((void*)value.ToPointer());
_generated\118\Windows.Win32.HPROPSHEETPAGE.g.cs (1)
57 public static explicit operator HPROPSHEETPAGE(IntPtr value) => new HPROPSHEETPAGE((void*)value.ToPointer());
_generated\120\Windows.Win32.HRGN.g.cs (1)
57 public static explicit operator HRGN(IntPtr value) => new HRGN((void*)value.ToPointer());
_generated\121\Windows.Win32.HWND.g.cs (1)
57 public static explicit operator HWND(IntPtr value) => new HWND((void*)value.ToPointer());
_generated\97\Windows.Win32.HANDLE.g.cs (1)
57 public static explicit operator HANDLE(IntPtr value) => new HANDLE((void*)value.ToPointer());
_generated\99\Windows.Win32.HBITMAP.g.cs (1)
57 public static explicit operator HBITMAP(IntPtr value) => new HBITMAP((void*)value.ToPointer());
PresentationCore (19)
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
523(MS.Win32.Recognizer.PACKET_PROPERTY*)(packetDescription.pPacketProperties.ToPointer()); 554(MS.Win32.Recognizer.PACKET_PROPERTY*)( pd.pPacketProperties.ToPointer( ) );
MS\Internal\Shaping\TypefaceMap.cs (1)
111(char*)ptext.ToPointer(),
MS\Internal\Text\TextInterface\Factory.cs (5)
74(IDWriteFontFileLoader*)pIDWriteFontFileLoaderMirror.ToPointer() 85(IDWriteFontCollectionLoader*)pIDWriteFontCollectionLoaderMirror.ToPointer() 305(IDWriteFontCollectionLoader*)pIDWriteFontCollectionLoaderMirror.ToPointer(); 357Value->UnregisterFontCollectionLoader((IDWriteFontCollectionLoader*)pIDWriteFontCollectionLoaderMirror.ToPointer()); 369Value->UnregisterFontFileLoader((IDWriteFontFileLoader*)pIDWriteFontFileLoaderMirror.ToPointer());
MS\Internal\Text\TextInterface\FontCollectionLoader.cs (1)
66(Native.IDWriteFactory*)factory.ToPointer()
src\wpf\src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (1)
2193UIntPtr hWndUIntPtr = new UIntPtr(hWnd.ToPointer());
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CharacterBuffer.cs (2)
221return new IntPtr(((char*)gcHandle.AddrOfPinnedObject().ToPointer()) + offset); 320return new IntPtr(((char*)gcHandle.AddrOfPinnedObject().ToPointer()) + offset);
System\Windows\InterOp\D3DImage.cs (3)
704data.hEvent = (ulong)hDuplicate.ToPointer(); 781data.pInteropDeviceBitmap = (ulong)_pInteropDeviceBitmap.DangerousGetHandle().ToPointer(); 798data.pSoftwareBitmap = (ulong)_softwareCopy.WicSourceHandle.DangerousGetHandle().ToPointer();
System\Windows\Media\Imaging\WriteableBitmap.cs (3)
883byte* pDest = (byte*)_backBuffer.ToPointer(); 887byte* pSource = (byte*)sourceBuffer.ToPointer(); 1215command.SwDoubleBufferedBitmap = (UInt64) _pDoubleBufferedBitmap.DangerousGetHandle().ToPointer();
System\Windows\Media\StreamAsIStream.cs (1)
536var span = new Span<byte>(buffer.ToPointer(), (int) cb);
PresentationFramework (23)
MS\Internal\WindowsRuntime\Generated\WinRT\FundamentalMarshalers.cs (4)
12public static unsafe void CopyAbi(bool value, IntPtr dest) => *(byte*)dest.ToPointer() = GetAbi(value).value; 14public static unsafe void CopyManaged(bool arg, IntPtr dest) => *(byte*)dest.ToPointer() = FromManaged(arg).value; 25public static unsafe void CopyAbi(char value, IntPtr dest) => *(ushort*)dest.ToPointer() = GetAbi(value).value; 27public static unsafe void CopyManaged(char arg, IntPtr dest) => *(ushort*)dest.ToPointer() = FromManaged(arg).value;
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (18)
145var elements = (IntPtr*)m._array.ToPointer(); 174var data = (IntPtr*)abi.data.ToPointer(); 185var data = (IntPtr*)abi.data.ToPointer(); 297var abiSpan = new ReadOnlySpan<T>(abi.data.ToPointer(), abi.length); 322Buffer.MemoryCopy(array_data, data.ToPointer(), byte_length, byte_length); 462var element = (byte*)m._array.ToPointer(); 492var data = (byte*)abi.data.ToPointer(); 510var data = (byte*)abi.data.ToPointer(); 541var bytes = (byte*)data.ToPointer(); 570var bytes = (byte*)data.ToPointer(); 586var data = (byte*)abi.data.ToPointer(); 643var element = (IntPtr*)m._array.ToPointer(); 672var data = (IntPtr*)abi.data.ToPointer(); 700var native = (IntPtr*)data.ToPointer(); 727var bytes = (byte*)data.ToPointer(); 743var data = (IntPtr*)abi.data.ToPointer(); 852*(IntPtr*)dest.ToPointer() = 959*(IntPtr*)dest.ToPointer() = objRef?.GetRef() ?? IntPtr.Zero;
System\Windows\Documents\ImmComposition.cs (1)
1367byte* p = (byte*)reconv.ToPointer();
System.Data.OleDb (6)
SafeHandles.cs (4)
263ReadOnlySpan<byte> span1 = new ReadOnlySpan<byte>(buf1.ToPointer(), count); 264ReadOnlySpan<byte> span2 = new ReadOnlySpan<byte>(buf2.ToPointer(), count); 279var dstSpan = new System.Span<byte>(dst.ToPointer(), count); 280var srcSpan = new System.Span<byte>(src.ToPointer(), count);
SafeNativeMethods.cs (2)
26IntPtr actualPtr = *(IntPtr*)lpAddress.ToPointer(); 31actualPtr = Interlocked.CompareExchange(ref *(IntPtr*)lpAddress.ToPointer(), lpValue, previousPtr);
System.Diagnostics.PerformanceCounter (1)
System\Diagnostics\SharedPerformanceCounter.cs (1)
1767Interlocked.CompareExchange(ref *(int*)_fileViewAddress.DangerousGetHandle().ToPointer(), initialOffset, 0);
System.Drawing.Common (3)
_generated\22\Windows.Win32.PRINTER_HANDLE.g.cs (1)
57 public static explicit operator PRINTER_HANDLE(IntPtr value) => new PRINTER_HANDLE((void*)value.ToPointer());
System\Drawing\Icon.cs (2)
595byte* candidate = ((byte*)bmpData.Scan0.ToPointer()) + (i * bmpData.Stride) + j; 640uint* pixelPtr = (uint*)bmpdata.Scan0.ToPointer();
System.Private.Reflection.Execution (2)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.MappingTables.cs (2)
398void* fptr = FunctionPointer.ToPointer(); 399void* otherFptr = other.FunctionPointer.ToPointer();
System.Private.Windows.Core (22)
_generated\10\Windows.Win32.BSTR.g.cs (1)
54 public static explicit operator BSTR(IntPtr value) => new BSTR((char*)value.ToPointer());
_generated\100\Windows.Win32.HBITMAP.g.cs (1)
57 public static explicit operator HBITMAP(IntPtr value) => new HBITMAP((void*)value.ToPointer());
_generated\101\Windows.Win32.HBRUSH.g.cs (1)
57 public static explicit operator HBRUSH(IntPtr value) => new HBRUSH((void*)value.ToPointer());
_generated\102\Windows.Win32.HCURSOR.g.cs (1)
57 public static explicit operator HCURSOR(IntPtr value) => new HCURSOR((void*)value.ToPointer());
_generated\103\Windows.Win32.HDC.g.cs (1)
57 public static explicit operator HDC(IntPtr value) => new HDC((void*)value.ToPointer());
_generated\105\Windows.Win32.HDROP.g.cs (1)
57 public static explicit operator HDROP(IntPtr value) => new HDROP((void*)value.ToPointer());
_generated\106\Windows.Win32.HENHMETAFILE.g.cs (1)
57 public static explicit operator HENHMETAFILE(IntPtr value) => new HENHMETAFILE((void*)value.ToPointer());
_generated\107\Windows.Win32.HFONT.g.cs (1)
57 public static explicit operator HFONT(IntPtr value) => new HFONT((void*)value.ToPointer());
_generated\108\Windows.Win32.HGDIOBJ.g.cs (1)
57 public static explicit operator HGDIOBJ(IntPtr value) => new HGDIOBJ((void*)value.ToPointer());
_generated\109\Windows.Win32.HGLOBAL.g.cs (1)
57 public static explicit operator HGLOBAL(IntPtr value) => new HGLOBAL((void*)value.ToPointer());
_generated\110\Windows.Win32.HICON.g.cs (1)
57 public static explicit operator HICON(IntPtr value) => new HICON((void*)value.ToPointer());
_generated\113\Windows.Win32.HINSTANCE.g.cs (1)
57 public static explicit operator HINSTANCE(IntPtr value) => new HINSTANCE((void*)value.ToPointer());
_generated\114\Windows.Win32.HMETAFILE.g.cs (1)
57 public static explicit operator HMETAFILE(IntPtr value) => new HMETAFILE((void*)value.ToPointer());
_generated\115\Windows.Win32.HMODULE.g.cs (1)
57 public static explicit operator HMODULE(IntPtr value) => new HMODULE((void*)value.ToPointer());
_generated\116\Windows.Win32.HMONITOR.g.cs (1)
57 public static explicit operator HMONITOR(IntPtr value) => new HMONITOR((void*)value.ToPointer());
_generated\117\Windows.Win32.HPALETTE.g.cs (1)
57 public static explicit operator HPALETTE(IntPtr value) => new HPALETTE((void*)value.ToPointer());
_generated\118\Windows.Win32.HPEN.g.cs (1)
57 public static explicit operator HPEN(IntPtr value) => new HPEN((void*)value.ToPointer());
_generated\119\Windows.Win32.HPROPSHEETPAGE.g.cs (1)
57 public static explicit operator HPROPSHEETPAGE(IntPtr value) => new HPROPSHEETPAGE((void*)value.ToPointer());
_generated\121\Windows.Win32.HRGN.g.cs (1)
57 public static explicit operator HRGN(IntPtr value) => new HRGN((void*)value.ToPointer());
_generated\122\Windows.Win32.HWND.g.cs (1)
57 public static explicit operator HWND(IntPtr value) => new HWND((void*)value.ToPointer());
_generated\98\Windows.Win32.HANDLE.g.cs (1)
57 public static explicit operator HANDLE(IntPtr value) => new HANDLE((void*)value.ToPointer());
Windows\Win32\System\Variant\VARIANT.cs (1)
876=> MemoryMarshal.CreateSpan(ref Unsafe.AsRef<T>(Marshal.UnsafeAddrOfPinnedArrayElement(array, 0).ToPointer()), array.Length);
System.Security.Cryptography (3)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeUnicodeStringHandle.cs (1)
38Span<char> dest = new Span<char>(handle.ToPointer(), cch);
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.cs (2)
116&& pCertContext->pCertInfo->SubjectPublicKeyInfo.Algorithm.Parameters.pbData.ToPointer() == NULL_ASN_TAG) 383Interop.Crypt32.CERT_EXTENSION* pCertExtension = (Interop.Crypt32.CERT_EXTENSION*)pCertInfo->rgExtension.ToPointer() + i;
System.Security.Cryptography.ProtectedData (1)
System\Security\Cryptography\ProtectedData.cs (1)
379interopSpan = new Span<byte>(outputBlob.pbData.ToPointer(), length);
System.Windows.Forms (3)
System\Windows\Forms\Controls\ImageList\ImageList.cs (3)
565Buffer.MemoryCopy(srcPtr.ToPointer(), destPtr.ToPointer(), length, length); 583byte* candidate = ((byte*)bmpData.Scan0.ToPointer()) + offsetRow + j;
System.Windows.Forms.Primitives (12)
_generated\100\Windows.Win32.HTASK.g.cs (1)
57 public static explicit operator HTASK(IntPtr value) => new HTASK((void*)value.ToPointer());
_generated\104\Windows.Win32.HWINEVENTHOOK.g.cs (1)
59 public static explicit operator HWINEVENTHOOK(IntPtr value) => new HWINEVENTHOOK((void*)value.ToPointer());
_generated\105\Windows.Win32.HWINSTA.g.cs (1)
57 public static explicit operator HWINSTA(IntPtr value) => new HWINSTA((void*)value.ToPointer());
_generated\429\Windows.Win32.PRINTER_HANDLE.g.cs (1)
57 public static explicit operator PRINTER_HANDLE(IntPtr value) => new PRINTER_HANDLE((void*)value.ToPointer());
_generated\44\Windows.Win32.DPI_AWARENESS_CONTEXT.g.cs (1)
57 public static explicit operator DPI_AWARENESS_CONTEXT(IntPtr value) => new DPI_AWARENESS_CONTEXT((void*)value.ToPointer());
_generated\76\Windows.Win32.HACCEL.g.cs (1)
57 public static explicit operator HACCEL(IntPtr value) => new HACCEL((void*)value.ToPointer());
_generated\78\Windows.Win32.HDESK.g.cs (1)
57 public static explicit operator HDESK(IntPtr value) => new HDESK((void*)value.ToPointer());
_generated\90\Windows.Win32.HHOOK.g.cs (1)
57 public static explicit operator HHOOK(IntPtr value) => new HHOOK((void*)value.ToPointer());
_generated\95\Windows.Win32.HIMC.g.cs (1)
57 public static explicit operator HIMC(IntPtr value) => new HIMC((void*)value.ToPointer());
_generated\97\Windows.Win32.HKEY.g.cs (1)
57 public static explicit operator HKEY(IntPtr value) => new HKEY((void*)value.ToPointer());
_generated\98\Windows.Win32.HKL.g.cs (1)
57 public static explicit operator HKL(IntPtr value) => new HKL((void*)value.ToPointer());
_generated\99\Windows.Win32.HMENU.g.cs (1)
57 public static explicit operator HMENU(IntPtr value) => new HMENU((void*)value.ToPointer());
UIAutomationClientSideProviders (6)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (4)
88IntPtr remoteTextArea = new IntPtr((byte*)rmem.Address.ToPointer() + cbSize); 95*(int*)((byte*)pszText.ToPointer()) = rmem.Address.ToInt32() + cbSize; 99*(IntPtr*)((byte*)pszText.ToPointer()) = remoteTextArea; 122rmem.ReadFrom(new IntPtr((byte*)rmem.Address.ToPointer() + cbSize), new IntPtr(pchRes), new IntPtr(maxLength * sizeof(char)));
MS\Internal\AutomationProxies\Misc.cs (2)
581VirtualAlloc(new IntPtr((byte *)memAddr.ToPointer() + cbSize - pageSize), new UIntPtr(pageSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_NOACCESS); 589String str = new string((char*)memAddr.ToPointer(), 0, maxLength);