Compartir a través de


streambuf::acquire Method

Gets a pointer to the next already allocated contiguous block of data.

virtual bool acquire(
   _Out_ _CharType*& ptr,
   _Out_ size_t& count
);

Parameters

  • ptr
    A reference to a pointer variable that will hold the address of the block on success.

  • count
    The number of contiguous characters available at the address in 'ptr.'

Return Value

true if the operation succeeded, false otherwise.

Remarks

A return of false does not necessarily indicate that a subsequent read operation would fail, only that there is no block to return immediately or that the stream buffer does not support the operation. The stream buffer may not de-allocate the block until ::release method is called. If the end of the stream is reached, the function will return true, a null pointer, and a count of zero; a subsequent read will not succeed.

Requirements

Header: astreambuf.h

Namespace: concurrency::streams

See Also

Reference

streambuf Class