API Reference


Brew Release
Brew MP 1.0.2
See Also
ISource, ISOURCEUTIL_PeekFromMemory(), ISOURCEUTIL_PeekFromSource()
The IPeek interface inherits from ISource, and represents an abstract data source that provides a Peek/Advance functionality that can be used to accumulate data in a buffer owned by the IPeek interface object. Data can be examined and sometimes modified before being consumed, as long as callers don't try to modify peeked data in an IPeek interface object when it is created using const data.
ISourceUtil provides functions to create an IPeek interface object from a memory buffer or ISource object.
Example code:
      IPeek * pIPeek = NULL;
      int nErr;

      nErr = ISHELL_CreateInstance(piShell, AEECLSID_SOURCEUTIL,
                                   (void **)&piSourceUtil);
      if (SUCCESS != nErr) { 
         // handle error
      // pszBuffer is the data buffer to peek at
      nErr = ISOURCEUTIL_PeekFromMemory(piSourceUtil, pMe->pszBuffer, pMe->nBufferLen, 
                                        NULL, NULL, &pIPeek);
      if (SUCCESS != nErr) { 
         // handle error
  • Follow