dispAllocBuffer

Allocates a buffer owned and managed by the Natural Access dispatcher.

Prototype

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 values

Return value

Description

SUCCESS

 

CTAERR_BAD_ARGUMENT

buffer is NULL or size is 0.

CTAERR_OUT_OF_MEMORY

Unable to allocate memory.


Details

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.

See also

dispFreeBuffer