Developer

API Reference

IPeek_Peek()

Brew Release
Brew MP 1.0.2
See Also
None
Description
This function returns a pointer to the buffered data, and optionally tries to read more data into the buffer.
Parameters
  • pIPeek
    [in]:
    Pointer to the IPeek Interface object.
  • cbWanted
    [in]:
    Number of bytes specified. If this many bytes are already available in the buffer, Peek() does no extra work; otherwise it tries to copy more data from the source. Pass 0 (zero) to quickly query the current buffer status. IPEEK_PEEKMAX is defined to represent "return as much as possible". IPEEK_GETBUFSIZE is defined to represent the amount of data buffering this IPeek is capable of.
  • pcbAvailable
    [out]:
    Size of the buffered data.
  • pnCode
    [out]:
    Returns a status code describing the availability of data beyond what was returned by IPeek_Peek():
    • IPEEK_END, No more data (END was encountered in the stream).

    • IPEEK_ERROR, No more data (ERROR was encountered in the stream).

    • IPEEK_FULL, Data limited by buffer size; must advance over buffered data
    • in order to obtain new data.

    • IPEEK_WAIT, Wait on IPeek_Peekable() before calling again; data source was
    • polled and is not available now.

    • IPEEK_UNK, Amount requested was less than amount buffered; call again with
    • larger cbWanted; data source was not polled.
Interface
Prototype
   char * IPeek_Peek(IPeek *  pIPeek, int32 cbWanted,
                     int32 * pcbAvailable, int32 * pnCode);
Return
char pointer pointing to start of buffered data.
Side Effect
None
Comment
None
  • Follow