LPVOID CoTaskMemAlloc(cb)
Semantically identical to retrieving the current task allocator with CoGetMalloc, invoking IMalloc::Alloc on that pointer with the same parameters, then releasing the IMalloc pointer.
Argument
Type
Description
cb
ULONG
The number of bytes to allocate.
return value
void *
The allocated memory block, or NULL if insufficient memory exists.