Developer

API Reference

ISource_Read()

Brew Release
Brew MP 1.0.2
See Also
None
Description

This method copies bytes from the source stream to the specified buffer. All copied bytes are consumed (that is, the read pointer is advanced).
Parameters
  • pif
    []:
    Pointer to the ISource Interface object.
  • pBuf
    []:
    Pointer to the buffer to receive bytes read
  • nBufLen
    []:
    Size of pc, in bytes.
Interface
Prototype
   int32 ISource_Read(
      ISource *   pif, 
      char *      pBuf, 
      int32       nBufLen
   );
Return

Number of bytes read, if successful. This will be a value greater than zero.
Error code, if otherwise. Possible error code include:
ISOURCE_END:end of stream (no more data).
ISOURCE_ERROR: error was encountered (no more data).
ISOURCE_WAIT: no data available at the moment; call Readable() to wait.
Comment
Note that the IWOURCE_WAIT return value is used instead of an error return value and an EWOULDBLOCK error code.
  • Follow