55 references to AllocCoTaskMem
Microsoft.Private.Windows.Core (1)
Windows\Win32\System\Com\Lifetime.cs (1)
54
var wrapper = (Lifetime<TVTable, TObject>*)Marshal.
AllocCoTaskMem
(sizeof(Lifetime<TVTable, TObject>));
PresentationCore (5)
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
521
packetDescription.pPacketProperties = Marshal.
AllocCoTaskMem
(allocationSize);
538
packets = Marshal.
AllocCoTaskMem
(countOfBytes);
System\Windows\Media\Imaging\PropVariant.cs (3)
137
destPtr = Marshal.
AllocCoTaskMem
((int)size);
184
destPtr = Marshal.
AllocCoTaskMem
((int)size);
385
pclsidVal = Marshal.
AllocCoTaskMem
(guid.Length);
PresentationFramework (17)
MS\Internal\IO\Packaging\indexingfiltermarshaler.cs (1)
212
pNative = Marshal.
AllocCoTaskMem
(Marshal.SizeOf(typeof(PROPVARIANT)));
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (1)
91
ComInterfaceEntry* nativeEntries = (ComInterfaceEntry*)Marshal.
AllocCoTaskMem
(sizeof(ComInterfaceEntry) * count);
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\ExceptionErrorInfo.cs (2)
107
var nativeVftbl = (IntPtr*)Marshal.
AllocCoTaskMem
(Marshal.SizeOf<Vftbl>());
341
var nativeVftbl = (IntPtr*)Marshal.
AllocCoTaskMem
(Marshal.SizeOf<Vftbl>());
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (7)
143
m._array = Marshal.
AllocCoTaskMem
(length * IntPtr.Size);
210
data = Marshal.
AllocCoTaskMem
(length * IntPtr.Size);
309
var data = Marshal.
AllocCoTaskMem
(byte_length);
460
m._array = Marshal.
AllocCoTaskMem
(byte_length);
540
data = Marshal.
AllocCoTaskMem
(byte_length);
641
m._array = Marshal.
AllocCoTaskMem
(byte_length);
699
data = Marshal.
AllocCoTaskMem
(byte_length);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (2)
117
var nativeVftbl = (IntPtr*)Marshal.
AllocCoTaskMem
(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1);
449
var nativeVftbl = (IntPtr*)Marshal.
AllocCoTaskMem
(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (1)
239
var nativeVftbl = (IntPtr*)Marshal.
AllocCoTaskMem
(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4);
System\Windows\Documents\InputScopeAttribute.cs (3)
56
ppinputscopes = Marshal.
AllocCoTaskMem
(sizeof(Int32) * count);
71
ppinputscopes = Marshal.
AllocCoTaskMem
(sizeof(Int32) * 1);
84
ppbstrPhrases = Marshal.
AllocCoTaskMem
(IntPtr.Size * count);
PresentationUI (1)
MS\Internal\Documents\PeoplePickerWrapper.cs (1)
144
IntPtr queryInitParamsPtr = Marshal.
AllocCoTaskMem
(Marshal.SizeOf(queryInitParams));
ReachFramework (1)
PrintConfig\PTProvider.cs (1)
390
IntPtr umDevMode = Marshal.
AllocCoTaskMem
(devMode.Length);
System.DirectoryServices (1)
System\DirectoryServices\DirectorySearcher.cs (1)
843
vlvValue.contextID = Marshal.
AllocCoTaskMem
(vlvValue.contextIDlength);
System.Private.CoreLib (15)
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (1)
436
byte* ptr = (byte*)Marshal.
AllocCoTaskMem
(size);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.cs (1)
121
Span<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)
1098
IntPtr ptr =
AllocCoTaskMem
(nb);
1115
IntPtr ptr =
AllocCoTaskMem
(checked(nb + 1));
1140
IntPtr ptr =
AllocCoTaskMem
(nb);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\AnsiStringMarshaller.cs (1)
28
byte* mem = (byte*)Marshal.
AllocCoTaskMem
(exactByteCount);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (1)
44
return (TUnmanagedElement*)Marshal.
AllocCoTaskMem
(spaceToAllocate);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\PointerArrayMarshaller.cs (1)
45
return (TUnmanagedElement*)Marshal.
AllocCoTaskMem
(spaceToAllocate);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ReadOnlySpanMarshaller.cs (1)
55
return (TUnmanagedElement*)Marshal.
AllocCoTaskMem
(spaceToAllocate);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (1)
49
return (TUnmanagedElement*)Marshal.
AllocCoTaskMem
(spaceToAllocate);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\Utf8StringMarshaller.cs (1)
29
byte* mem = (byte*)Marshal.
AllocCoTaskMem
(exactByteCount);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (1)
375
ptr = Marshal.
AllocCoTaskMem
(byteLength);
System\Runtime\InteropServices\Marshal.NativeAot.cs (2)
265
IntPtr nativeBytes =
AllocCoTaskMem
(size);
343
IntPtr nativeBytes =
AllocCoTaskMem
(size);
System\Runtime\InteropServices\PInvokeMarshal.cs (1)
519
pNative = (byte*)Marshal.
AllocCoTaskMem
(checked(length + 1));
System.Private.Windows.Core (1)
Windows\Win32\System\Com\Lifetime.cs (1)
54
var wrapper = (Lifetime<TVTable, TObject>*)Marshal.
AllocCoTaskMem
(sizeof(Lifetime<TVTable, TObject>));
System.Speech (2)
Internal\SapiInterop\SapiRecoInterop.cs (1)
456
coMem = Marshal.
AllocCoTaskMem
(size * elements.Length);
Internal\SapiInterop\SpAudioStreamWrapper.cs (1)
63
format = Marshal.
AllocCoTaskMem
(_wfx.Length);
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
628
nint allocatedStringBuffer = Marshal.
AllocCoTaskMem
((int)info.cch * sizeof(char));
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\UnicodeCharBuffer.cs (1)
20
IntPtr result = Marshal.
AllocCoTaskMem
(_buffer.Length * 2);
Windows\Win32\PInvoke.CreateWindowEx.cs (1)
57
nint native = Marshal.
AllocCoTaskMem
(size);
UIAutomationClient (3)
MS\Internal\Automation\UiaCoreApi.cs (1)
139
IntPtr dataStart = Marshal.
AllocCoTaskMem
((properties.Length + patterns.Length) * sizeof(int));
System\Windows\Automation\Condition.cs (2)
43
IntPtr mem = Marshal.
AllocCoTaskMem
(size);
60
IntPtr mem = Marshal.
AllocCoTaskMem
(conditions.Length * IntPtr.Size);
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\SafeCoTaskMem.cs (1)
18
SetHandle(Marshal.
AllocCoTaskMem
(length * sizeof (char)));
UIAutomationTypes (4)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (3)
2025
IntPtr mem = Marshal.
AllocCoTaskMem
(16);
2336
IntPtr result = Marshal.
AllocCoTaskMem
(buffer.Length);
2394
IntPtr result = Marshal.
AllocCoTaskMem
(buffer.Length * 2);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (1)
2564
mem = Marshal.
AllocCoTaskMem
(len * VariantSize);