Allocates a block of foreign memory for use in COM method argument passing.
com
co-task-mem-alloc &key type pointer-type initial-element initial-contents nelems => pointer
type⇩ |
A foreign type. |
pointer-type⇩ |
A foreign pointer type. |
initial-element⇩ |
An object. |
initial-contents⇩ |
A list. |
nelems⇩ |
An integer. |
pointer |
A pointer to the specified type or pointer-type. |
The function co-task-mem-alloc
calls the C function CoTaskMemAlloc()
to allocate a block of memory.
type, pointer-type, initial-element, initial-contents and nelems are handled in the same way as for the function fli:allocate-foreign-object.
Two ways to allocate memory for an integer:
(co-task-mem-alloc :type :int)
(co-task-mem-alloc :pointer-type '(:pointer :int))
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:38