14 references to AllocHGlobal
aspire (1)
Processes\WindowsProcessInterop.cs (1)
387var attrList = Marshal.AllocHGlobal(attrListSize);
Aspire.Hosting.Browsers (1)
BrowserLogsPipeBrowserProcessLauncher.Windows.cs (1)
80var attributeList = Marshal.AllocHGlobal((nint)attributeListSize.ToUInt64());
Aspire.Hosting.Browsers.Tests (1)
src\Aspire.Hosting.Browsers\BrowserLogsPipeBrowserProcessLauncher.Windows.cs (1)
80var attributeList = Marshal.AllocHGlobal((nint)attributeListSize.ToUInt64());
Microsoft.AspNetCore.Cryptography.Internal (1)
SafeHandles\SecureLocalAllocHandle.cs (1)
46handle = Marshal.AllocHGlobal(cb); // actually calls LocalAlloc
System.Data.Odbc (1)
Common\System\Data\Common\SafeNativeMethods.cs (1)
12var handle = Marshal.AllocHGlobal(initialSize);
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (3)
31public static IntPtr AllocHGlobal(int cb) => AllocHGlobal((nint)cb); 1036IntPtr ptr = AllocHGlobal((IntPtr)nb); 1057IntPtr ptr = AllocHGlobal((IntPtr)nb);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (1)
75public static IntPtr AllocCoTaskMem(int cb) => AllocHGlobal((nint)(uint)cb);
System.ServiceProcess.ServiceController (4)
System\ServiceProcess\ServiceController.cs (4)
203IntPtr enumBuffer = Marshal.AllocHGlobal((IntPtr)bytesNeeded); 317IntPtr bufPtr = Marshal.AllocHGlobal((IntPtr)bytesNeeded); 396IntPtr bufPtr = Marshal.AllocHGlobal((IntPtr)bytesNeeded); 761IntPtr memory = Marshal.AllocHGlobal((IntPtr)bytesNeeded);
System.Windows.Forms (1)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
1431ptrToFree = Marshal.AllocHGlobal((nint)(sizeToAllocate + (IntPtr.Size - 1)));