Allocates a buffer owned and managed by the Natural Access dispatcher.
DWORD dispAllocBuffer (void **buffer, DWORD size)
|
Argument |
Description |
|
buffer |
Pointer to the returned address of the allocated buffer. |
|
size |
Size of buffer to allocate (in bytes). |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_BAD_ARGUMENT |
buffer is NULL or size is 0. |
|
CTAERR_OUT_OF_MEMORY |
Unable to allocate memory. |
dispAllocBuffer allocates a buffer that is managed by the Natural Access dispatcher. If you are passing dispAllocBuffer in an event message, set the CTA_INTERNAL_BUFFER in the buffer's associated size field. When the buffer is sent in an event, either the dispatcher frees the buffer when event delivery is complete or the application frees the buffer.