58 references to AllocHGlobal
Microsoft.AspNetCore.Server.HttpSys (1)
NativeInterop\RequestQueue.cs (1)
58
pSecurityDescriptor = Marshal.
AllocHGlobal
(securityDescriptorBytes.Length);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
ProcessTracker.cs (1)
35
var extendedInfoPtr = Marshal.
AllocHGlobal
(length);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Windows\Network\WindowsTcpStateInfo.cs (1)
121
tcpTable = Marshal.
AllocHGlobal
((int)size);
Microsoft.ML.Vision (1)
ImageClassificationTrainer.cs (1)
1554
IntPtr tstringPtr = Marshal.
AllocHGlobal
(sizeOfTString);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.cs (1)
64
_warningNumberArrayPointer = Marshal.
AllocHGlobal
(0);
PresentationFramework (9)
MS\Internal\Printing\PrintDlgExMarshaler.cs (6)
490
pdex.lpPageRanges = Marshal.
AllocHGlobal
(Marshal.SizeOf(typeof(NativeMethods.PRINTPAGERANGE)));
530
unmanagedBuffer = Marshal.
AllocHGlobal
(cbBufferSize);
569
pdex.lpPageRanges = Marshal.
AllocHGlobal
(Marshal.SizeOf(typeof(NativeMethods.PRINTPAGERANGE)));
609
unmanagedBuffer = Marshal.
AllocHGlobal
(cbBufferSize);
724
hDevNames = Marshal.
AllocHGlobal
(cbDevNames);
815
IntPtr hDevMode = Marshal.
AllocHGlobal
(devModeData.Length);
MS\Internal\WindowsRuntime\Generated\WinRT\IInspectable.cs (1)
45
AbiToProjectionVftablePtr = Marshal.
AllocHGlobal
(Marshal.SizeOf<Vftbl>());
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\IUnknownVftbl.cs (1)
25
AbiToProjectionVftblPtr = Marshal.
AllocHGlobal
(Marshal.SizeOf<IUnknownVftbl>());
System\Windows\Documents\NLGSpellerInterop.cs (1)
189
IntPtr inputArray = Marshal.
AllocHGlobal
(count * 2);
PresentationUI (1)
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
325
_ptrToDsObjectNames = Marshal.
AllocHGlobal
(data.Length);
System.DirectoryServices.Protocols (16)
System\DirectoryServices\Protocols\common\BerConverter.cs (4)
324
berValue.bv_val = Marshal.
AllocHGlobal
(value.Length);
469
IntPtr tmp = Marshal.
AllocHGlobal
(tempValue.Length);
543
managedBervalArray[i].bv_val = Marshal.
AllocHGlobal
(byteArray.Length);
548
IntPtr valPtr = Marshal.
AllocHGlobal
(structSize);
System\DirectoryServices\Protocols\common\utils.cs (1)
44
IntPtr intPtrArray = Marshal.
AllocHGlobal
(IntPtr.Size * size);
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (8)
540
IntPtr controlPtr = Marshal.
AllocHGlobal
(structSize);
556
IntPtr controlPtr = Marshal.
AllocHGlobal
(structSize);
618
bv_val = Marshal.
AllocHGlobal
(byteArray.Length)
650
IntPtr controlPtr = Marshal.
AllocHGlobal
(modStructSize);
684
bv_val = Marshal.
AllocHGlobal
(val.Length)
1231
bv_val = Marshal.
AllocHGlobal
(sizeof(byte) * byteControlValue.Length)
1319
bv_val = Marshal.
AllocHGlobal
(byteArray.Length)
1336
controlPtr = Marshal.
AllocHGlobal
(structSize);
System\DirectoryServices\Protocols\ldap\LdapConnection.Linux.cs (1)
126
IntPtr ptrToDefaults = Marshal.
AllocHGlobal
(Marshal.SizeOf(defaults));
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (2)
581
IntPtr controlPtr = Marshal.
AllocHGlobal
(structSize);
597
IntPtr controlPtr = Marshal.
AllocHGlobal
(structSize);
System.Drawing.Common (17)
System\Drawing\Imaging\EncoderParameter.cs (16)
69
_parameterValue = Marshal.
AllocHGlobal
(sizeof(byte));
84
_parameterValue = Marshal.
AllocHGlobal
(sizeof(byte));
96
_parameterValue = Marshal.
AllocHGlobal
(sizeof(short));
108
_parameterValue = Marshal.
AllocHGlobal
(sizeof(int));
120
_parameterValue = Marshal.
AllocHGlobal
(2 * sizeof(int));
133
_parameterValue = Marshal.
AllocHGlobal
(2 * sizeof(int));
151
_parameterValue = Marshal.
AllocHGlobal
(4 * sizeof(int));
177
_parameterValue = Marshal.
AllocHGlobal
(_numberOfValues);
190
_parameterValue = Marshal.
AllocHGlobal
(_numberOfValues);
202
_parameterValue = Marshal.
AllocHGlobal
(checked(_numberOfValues * sizeof(short)));
214
_parameterValue = Marshal.
AllocHGlobal
(checked(_numberOfValues * sizeof(int)));
234
_parameterValue = Marshal.
AllocHGlobal
(checked(_numberOfValues * 2 * sizeof(int)));
254
_parameterValue = Marshal.
AllocHGlobal
(checked(_numberOfValues * 2 * sizeof(int)));
281
_parameterValue = Marshal.
AllocHGlobal
(checked(_numberOfValues * 4 * sizeof(int)));
310
_parameterValue = Marshal.
AllocHGlobal
(bytes);
336
_parameterValue = Marshal.
AllocHGlobal
(bytes);
System\Drawing\Imaging\EncoderParameters.cs (1)
21
GdiPlus.EncoderParameters* native = (GdiPlus.EncoderParameters*)Marshal.
AllocHGlobal
(
System.Net.Security (1)
System\Net\Security\Pal.Managed\SafeChannelBindingHandle.cs (1)
39
handle = Marshal.
AllocHGlobal
(SecChannelBindingSize + _cbtPrefixByteArraySize + CertHashMaxSize);
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
1033
IntPtr ptr =
AllocHGlobal
(checked(nb + 1));
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (2)
370
ptr = Marshal.
AllocHGlobal
(byteLength);
429
buffer.SetHandle(Marshal.
AllocHGlobal
(byteLength));
System.Reflection.Metadata (1)
System\Reflection\Internal\MemoryBlocks\NativeHeapMemoryBlock.cs (1)
32
_pointer = Marshal.
AllocHGlobal
(size);
System.Security.Cryptography (1)
Microsoft\Win32\SafeHandles\SafePasswordHandle.cs (1)
47
handle = Marshal.
AllocHGlobal
(spanLen * sizeof(char));
System.Text.Encoding.CodePages (1)
System\Text\BaseCodePageEncoding.cs (1)
369
byte* pNativeMemory = (byte*)Marshal.
AllocHGlobal
(iSize);
System.Windows.Forms (1)
System\Windows\Forms\Controls\ListView\ListView.cs (1)
4160
hGlobalColumns = Marshal.
AllocHGlobal
((int)(lvItem.cColumns * sizeof(int)));
System.Windows.Forms.Design (1)
System\Drawing\Design\ColorEditor.CustomColorDialog.cs (1)
28
_hInstance = Marshal.
AllocHGlobal
(size);
System.Windows.Forms.Tests (1)
System\Windows\Forms\MessageTests.cs (1)
187
IntPtr ptr = Marshal.
AllocHGlobal
(Marshal.SizeOf<TestStruct>());