An integer representing the address of the block of memory allocated. This memory must be released with Marshal.FreeCoTaskMem(IntPtr).
Marshal.AllocCoTaskMem(int) is one of two memory allocation API methods in the System.Runtime.InteropServices.Marshal class. (Marshal.AllocHGlobal(IntPtr) is the other.) The initial memory content returned is undefined, and the allocated memory can be larger than the requested number of bytes. This method exposes the COM tp://go.microsoft.com/fwlink/?LinkId=148626 function, which is referred to as the COM task memory allocator.