69 references to AllocCoTaskMem
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
BlindAggregatorFactory.cs (2)
40var pResult = (BlindAggregator*)Marshal.AllocCoTaskMem(sizeof(BlindAggregator)); 111var ptr = Marshal.AllocCoTaskMem(sizeof(VTable));
Microsoft.VisualStudio.LanguageServices (2)
Snippets\AbstractSnippetInfoService.cs (1)
187pSnippetInfo[0] = Marshal.AllocCoTaskMem(Marshal.SizeOf(snippetInfo));
Venus\ContainedLanguage.IVsContainedLanguageCodeSupport.cs (1)
242var current = Marshal.AllocCoTaskMem(source.Count() * IntPtr.Size);
PresentationCore (5)
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
521packetDescription.pPacketProperties = Marshal.AllocCoTaskMem(allocationSize); 538packets = Marshal.AllocCoTaskMem(countOfBytes);
System\Windows\Media\Imaging\PropVariant.cs (3)
137destPtr = Marshal.AllocCoTaskMem((int)size); 184destPtr = Marshal.AllocCoTaskMem((int)size); 385pclsidVal = Marshal.AllocCoTaskMem(guid.Length);
PresentationFramework (17)
MS\Internal\IO\Packaging\indexingfiltermarshaler.cs (1)
212pNative = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(PROPVARIANT)));
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (1)
91ComInterfaceEntry* nativeEntries = (ComInterfaceEntry*)Marshal.AllocCoTaskMem(sizeof(ComInterfaceEntry) * count);
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\ExceptionErrorInfo.cs (2)
107var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<Vftbl>()); 341var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<Vftbl>());
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (7)
143m._array = Marshal.AllocCoTaskMem(length * IntPtr.Size); 210data = Marshal.AllocCoTaskMem(length * IntPtr.Size); 309var data = Marshal.AllocCoTaskMem(byte_length); 460m._array = Marshal.AllocCoTaskMem(byte_length); 540data = Marshal.AllocCoTaskMem(byte_length); 641m._array = Marshal.AllocCoTaskMem(byte_length); 699data = Marshal.AllocCoTaskMem(byte_length);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (2)
117var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 449var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (1)
239var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4);
System\Windows\Documents\InputScopeAttribute.cs (3)
56ppinputscopes = Marshal.AllocCoTaskMem(sizeof(Int32) * count); 71ppinputscopes = Marshal.AllocCoTaskMem(sizeof(Int32) * 1); 84ppbstrPhrases = Marshal.AllocCoTaskMem(IntPtr.Size * count);
PresentationUI (1)
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
144IntPtr queryInitParamsPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(queryInitParams));
ReachFramework (1)
PrintConfig\PTProvider.cs (1)
390IntPtr umDevMode = Marshal.AllocCoTaskMem(devMode.Length);
System.Drawing.Common.Tests (2)
System\Drawing\Text\PrivateFontCollectionTests.cs (2)
140IntPtr fontBuffer = Marshal.AllocCoTaskMem(data.Length); 176IntPtr fontBuffer = Marshal.AllocCoTaskMem(data.Length);
System.Private.CoreLib (19)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.cs (1)
121Span<EventPipeProviderConfigurationNative> providersNative = new Span<EventPipeProviderConfigurationNative>((void*)Marshal.AllocCoTaskMem(sizeof(EventPipeProviderConfigurationNative) * providers.Length), providers.Length);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (3)
996IntPtr ptr = AllocCoTaskMem(nb); 1013IntPtr ptr = AllocCoTaskMem(checked(nb + 1)); 1038IntPtr ptr = AllocCoTaskMem(nb);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\AnsiStringMarshaller.cs (1)
27byte* mem = (byte*)Marshal.AllocCoTaskMem(exactByteCount);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (1)
43return (TUnmanagedElement*)Marshal.AllocCoTaskMem(spaceToAllocate);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\PointerArrayMarshaller.cs (1)
44return (TUnmanagedElement*)Marshal.AllocCoTaskMem(spaceToAllocate);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ReadOnlySpanMarshaller.cs (1)
54return (TUnmanagedElement*)Marshal.AllocCoTaskMem(spaceToAllocate);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (1)
48return (TUnmanagedElement*)Marshal.AllocCoTaskMem(spaceToAllocate);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\Utf8StringMarshaller.cs (1)
28byte* mem = (byte*)Marshal.AllocCoTaskMem(exactByteCount);
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (1)
374ptr = Marshal.AllocCoTaskMem(byteLength);
src\System\StubHelpers.cs (8)
77pbNativeBuffer = (byte*)Marshal.AllocCoTaskMem(nb); 97pbNativeBuffer = (byte*)Marshal.AllocCoTaskMem(2); 110pbNativeBuffer = (byte*)Marshal.AllocCoTaskMem(nb + 2); 353pNative = (byte*)Marshal.AllocCoTaskMem(nbytes); 1002pNativeHome = Marshal.AllocCoTaskMem(allocSize); 1046pNativeHome = Marshal.AllocCoTaskMem(allocSize); 1070pNativeHome = Marshal.AllocCoTaskMem(allocSize); 1101IntPtr pNativeHome = Marshal.AllocCoTaskMem(allocSize);
System.Private.Windows.Core (1)
Windows\Win32\System\Com\Lifetime.cs (1)
56var wrapper = (Lifetime<TVTable, TObject>*)Marshal.AllocCoTaskMem(sizeof(Lifetime<TVTable, TObject>));
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\UnicodeCharBuffer.cs (1)
20IntPtr result = Marshal.AllocCoTaskMem(_buffer.Length * 2);
Windows\Win32\PInvoke.CreateWindowEx.cs (1)
57nint native = Marshal.AllocCoTaskMem(size);
System.Windows.Forms.Primitives.Tests (6)
Interop\Ole32\CADWORDTests.cs (1)
38pElems = (uint*)Marshal.AllocCoTaskMem(sizeof(uint) * values.Length)
Interop\Ole32\CALPOLESTRTests.cs (1)
38pElems = (PWSTR*)Marshal.AllocCoTaskMem(IntPtr.Size * values.Length)
Interop\Oleaut32\VARIANTTests.cs (4)
5492nint mem = Marshal.AllocCoTaskMem(sizeof(int)); 5524nint mem = Marshal.AllocCoTaskMem(sizeof(int)); 5536nint mem = Marshal.AllocCoTaskMem(sizeof(int)); 5578nint mem = Marshal.AllocCoTaskMem(sizeof(int));
System.Windows.Forms.Tests (2)
System\Windows\Forms\RichTextBoxTests.cs (2)
10225IntPtr ptr = Marshal.AllocCoTaskMem(100); 10461IntPtr ptr = Marshal.AllocCoTaskMem(100);
TlsFeaturesObserve (1)
HttpSys\HttpSysConfigurator.cs (1)
54var pInputConfigInfo = Marshal.AllocCoTaskMem(
UIAutomationClient (3)
MS\Internal\Automation\UiaCoreApi.cs (1)
139IntPtr dataStart = Marshal.AllocCoTaskMem((properties.Length + patterns.Length) * sizeof(int));
System\Windows\Automation\Condition.cs (2)
43IntPtr mem = Marshal.AllocCoTaskMem(size); 60IntPtr mem = Marshal.AllocCoTaskMem(conditions.Length * IntPtr.Size);
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\SafeCoTaskMem.cs (1)
18SetHandle(Marshal.AllocCoTaskMem(length * sizeof (char)));
UIAutomationTypes (4)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (3)
2025IntPtr mem = Marshal.AllocCoTaskMem(16); 2336IntPtr result = Marshal.AllocCoTaskMem(buffer.Length); 2394IntPtr result = Marshal.AllocCoTaskMem(buffer.Length * 2);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (1)
2564mem = Marshal.AllocCoTaskMem(len * VariantSize);