55 references to AllocCoTaskMem
Microsoft.Private.Windows.Core (1)
Windows\Win32\System\Com\Lifetime.cs (1)
54var wrapper = (Lifetime<TVTable, TObject>*)Marshal.AllocCoTaskMem(sizeof(Lifetime<TVTable, TObject>));
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.DirectoryServices (1)
System\DirectoryServices\DirectorySearcher.cs (1)
843vlvValue.contextID = Marshal.AllocCoTaskMem(vlvValue.contextIDlength);
System.Private.CoreLib (15)
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (1)
436byte* ptr = (byte*)Marshal.AllocCoTaskMem(size);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (3)
1098IntPtr ptr = AllocCoTaskMem(nb); 1115IntPtr ptr = AllocCoTaskMem(checked(nb + 1)); 1140IntPtr ptr = AllocCoTaskMem(nb);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\AnsiStringMarshaller.cs (1)
28byte* mem = (byte*)Marshal.AllocCoTaskMem(exactByteCount);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (1)
44return (TUnmanagedElement*)Marshal.AllocCoTaskMem(spaceToAllocate);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\PointerArrayMarshaller.cs (1)
45return (TUnmanagedElement*)Marshal.AllocCoTaskMem(spaceToAllocate);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ReadOnlySpanMarshaller.cs (1)
55return (TUnmanagedElement*)Marshal.AllocCoTaskMem(spaceToAllocate);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (1)
49return (TUnmanagedElement*)Marshal.AllocCoTaskMem(spaceToAllocate);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\Utf8StringMarshaller.cs (1)
29byte* mem = (byte*)Marshal.AllocCoTaskMem(exactByteCount);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (1)
375ptr = Marshal.AllocCoTaskMem(byteLength);
System\Runtime\InteropServices\Marshal.NativeAot.cs (2)
265IntPtr nativeBytes = AllocCoTaskMem(size); 343IntPtr nativeBytes = AllocCoTaskMem(size);
System\Runtime\InteropServices\PInvokeMarshal.cs (1)
519pNative = (byte*)Marshal.AllocCoTaskMem(checked(length + 1));
System.Private.Windows.Core (1)
Windows\Win32\System\Com\Lifetime.cs (1)
54var wrapper = (Lifetime<TVTable, TObject>*)Marshal.AllocCoTaskMem(sizeof(Lifetime<TVTable, TObject>));
System.Speech (2)
Internal\SapiInterop\SapiRecoInterop.cs (1)
456coMem = Marshal.AllocCoTaskMem(size * elements.Length);
Internal\SapiInterop\SpAudioStreamWrapper.cs (1)
63format = Marshal.AllocCoTaskMem(_wfx.Length);
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
628nint allocatedStringBuffer = Marshal.AllocCoTaskMem((int)info.cch * sizeof(char));
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);
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\wpf\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\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (1)
2564mem = Marshal.AllocCoTaskMem(len * VariantSize);