113 references to ToPointer
Interop.FunctionalTests (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
153return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.HttpSys (4)
NativeInterop\RequestQueue.cs (1)
66lpSecurityDescriptor = pSecurityDescriptor.Value.ToPointer(),
NativeInterop\UrlGroup.cs (1)
92var statusCode = PInvoke.HttpSetUrlGroupProperty(Id, property, info.ToPointer(), infosize);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
153return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Windows.Win32.HLOCAL.g.cs (1)
49 public static explicit operator HLOCAL(IntPtr value) => new HLOCAL((void*)value.ToPointer());
Microsoft.AspNetCore.Server.IIS (1)
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\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\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\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
153return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.ML.ImageAnalytics (1)
MLImage.cs (1)
108imagePixelData.CopyTo(new Span<byte>(image.GetPixels().ToPointer(), image.Width * image.Height * 4));
Microsoft.ML.LightGbm (2)
WrappedLightGbmDataset.cs (2)
61ptrArrayValues[i] = (double*)gcValues[i].AddrOfPinnedObject().ToPointer(); 63ptrArrayIndices[i] = (int*)gcIndices[i].AddrOfPinnedObject().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\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (1)
2193UIntPtr hWndUIntPtr = new UIntPtr(hWnd.ToPointer());
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.Drawing.Common (2)
System\Drawing\Icon.cs (2)
595byte* candidate = ((byte*)bmpData.Scan0.ToPointer()) + (i * bmpData.Stride) + j; 640uint* pixelPtr = (uint*)bmpdata.Scan0.ToPointer();
System.Private.CoreLib (10)
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (6)
159return RuntimeHelpers.Box(_methodTable, ref Unsafe.AsRef<byte>(_addressOrOffset.ToPointer())); 169ref Unsafe.AsRef<byte>(_addressOrOffset.ToPointer())), _fieldInfo.FieldType); 267ref Unsafe.AsRef<byte>(_addressOrOffset.ToPointer()), 274ref Unsafe.AsRef<short>(_addressOrOffset.ToPointer()), 281ref Unsafe.AsRef<int>(_addressOrOffset.ToPointer()), 288ref Unsafe.AsRef<long>(_addressOrOffset.ToPointer()),
src\System\Reflection\MdFieldInfo.cs (1)
117m_fieldType = new Signature(fieldMarshal.Signature.ToPointer(),
src\System\Reflection\MdImport.cs (1)
125return ((byte*)m_constArray.ToPointer())[index];
src\System\Reflection\RuntimePropertyInfo.cs (1)
74m_signature = new Signature(sig.Signature.ToPointer(), sig.Length, m_declaringType);
src\System\RuntimeType.CoreCLR.cs (1)
3340bool ret = CastHelpers.IsInstanceOfAny(GetUnderlyingNativeHandle().ToPointer(), o) is not null;
System.Private.Windows.Core (22)
Windows.Win32.BSTR.g.cs (1)
54 public static explicit operator BSTR(IntPtr value) => new BSTR((char*)value.ToPointer());
Windows.Win32.HANDLE.g.cs (1)
57 public static explicit operator HANDLE(IntPtr value) => new HANDLE((void*)value.ToPointer());
Windows.Win32.HBITMAP.g.cs (1)
57 public static explicit operator HBITMAP(IntPtr value) => new HBITMAP((void*)value.ToPointer());
Windows.Win32.HBRUSH.g.cs (1)
57 public static explicit operator HBRUSH(IntPtr value) => new HBRUSH((void*)value.ToPointer());
Windows.Win32.HCURSOR.g.cs (1)
57 public static explicit operator HCURSOR(IntPtr value) => new HCURSOR((void*)value.ToPointer());
Windows.Win32.HDC.g.cs (1)
57 public static explicit operator HDC(IntPtr value) => new HDC((void*)value.ToPointer());
Windows.Win32.HDROP.g.cs (1)
57 public static explicit operator HDROP(IntPtr value) => new HDROP((void*)value.ToPointer());
Windows.Win32.HENHMETAFILE.g.cs (1)
57 public static explicit operator HENHMETAFILE(IntPtr value) => new HENHMETAFILE((void*)value.ToPointer());
Windows.Win32.HFONT.g.cs (1)
57 public static explicit operator HFONT(IntPtr value) => new HFONT((void*)value.ToPointer());
Windows.Win32.HGDIOBJ.g.cs (1)
57 public static explicit operator HGDIOBJ(IntPtr value) => new HGDIOBJ((void*)value.ToPointer());
Windows.Win32.HGLOBAL.g.cs (1)
57 public static explicit operator HGLOBAL(IntPtr value) => new HGLOBAL((void*)value.ToPointer());
Windows.Win32.HICON.g.cs (1)
57 public static explicit operator HICON(IntPtr value) => new HICON((void*)value.ToPointer());
Windows.Win32.HINSTANCE.g.cs (1)
57 public static explicit operator HINSTANCE(IntPtr value) => new HINSTANCE((void*)value.ToPointer());
Windows.Win32.HMETAFILE.g.cs (1)
57 public static explicit operator HMETAFILE(IntPtr value) => new HMETAFILE((void*)value.ToPointer());
Windows.Win32.HMODULE.g.cs (1)
57 public static explicit operator HMODULE(IntPtr value) => new HMODULE((void*)value.ToPointer());
Windows.Win32.HMONITOR.g.cs (1)
57 public static explicit operator HMONITOR(IntPtr value) => new HMONITOR((void*)value.ToPointer());
Windows.Win32.HPALETTE.g.cs (1)
57 public static explicit operator HPALETTE(IntPtr value) => new HPALETTE((void*)value.ToPointer());
Windows.Win32.HPEN.g.cs (1)
57 public static explicit operator HPEN(IntPtr value) => new HPEN((void*)value.ToPointer());
Windows.Win32.HPROPSHEETPAGE.g.cs (1)
57 public static explicit operator HPROPSHEETPAGE(IntPtr value) => new HPROPSHEETPAGE((void*)value.ToPointer());
Windows.Win32.HRGN.g.cs (1)
57 public static explicit operator HRGN(IntPtr value) => new HRGN((void*)value.ToPointer());
Windows.Win32.HWND.g.cs (1)
57 public static explicit operator HWND(IntPtr value) => new HWND((void*)value.ToPointer());
Windows\Win32\System\Variant\VARIANT.cs (1)
868=> MemoryMarshal.CreateSpan(ref Unsafe.AsRef<T>(Marshal.UnsafeAddrOfPinnedArrayElement(array, 0).ToPointer()), array.Length);
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 (11)
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());
Windows.Win32.HACCEL.g.cs (1)
57 public static explicit operator HACCEL(IntPtr value) => new HACCEL((void*)value.ToPointer());
Windows.Win32.HDESK.g.cs (1)
57 public static explicit operator HDESK(IntPtr value) => new HDESK((void*)value.ToPointer());
Windows.Win32.HHOOK.g.cs (1)
57 public static explicit operator HHOOK(IntPtr value) => new HHOOK((void*)value.ToPointer());
Windows.Win32.HIMC.g.cs (1)
57 public static explicit operator HIMC(IntPtr value) => new HIMC((void*)value.ToPointer());
Windows.Win32.HKEY.g.cs (1)
57 public static explicit operator HKEY(IntPtr value) => new HKEY((void*)value.ToPointer());
Windows.Win32.HKL.g.cs (1)
57 public static explicit operator HKL(IntPtr value) => new HKL((void*)value.ToPointer());
Windows.Win32.HMENU.g.cs (1)
57 public static explicit operator HMENU(IntPtr value) => new HMENU((void*)value.ToPointer());
Windows.Win32.HTASK.g.cs (1)
57 public static explicit operator HTASK(IntPtr value) => new HTASK((void*)value.ToPointer());
Windows.Win32.HWINEVENTHOOK.g.cs (1)
59 public static explicit operator HWINEVENTHOOK(IntPtr value) => new HWINEVENTHOOK((void*)value.ToPointer());
Windows.Win32.HWINSTA.g.cs (1)
57 public static explicit operator HWINSTA(IntPtr value) => new HWINSTA((void*)value.ToPointer());
System.Windows.Forms.Primitives.Tests (4)
Interop\Oleaut32\VARIANTTests.cs (4)
5501variant.data.Anonymous.pvRecord = mem.ToPointer(); 5528variant.data.Anonymous.pvRecord = mem.ToPointer(); 5546variant.data.Anonymous.pvRecord = mem.ToPointer(); 5588variant.data.Anonymous.pvRecord = mem.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);