Developer

API Reference

IDocModel_Write()

Brew Release
Brew MP 1.0.2
See Also
- IDocModel_Writeable
- IDocModel_WriteTerminate
Description
This function is used to pass document data to the model. This is an append operation -- the data is added to whatever was previously in the document. A Write operation
must be terminated with IDOCMODEL_WriteTermiante() to inform the model that no more data is to be expected and the document is completely loaded.
This function will return the number of bytes that were successfully written. If the return value does not equal 'cbLen', another write operation may be scheduled with IDOCMODEL_Writeable().
Parameters
  • p
    []:
    Pointer to the IDocModel interface object.
  • pbWrite
    []:
    Pointer to buffer containing document data
  • cbLen
    []:
    Count of data bytes in buffer 'pbWrite'
  • pcbWrote
    []:
    Address of variable to receive number of bytes accepted/written
Interface
Prototype
   int IDocModel_Write(IDocModel *po, const byte *pbWrite, int cbLen, int *pcbWrote);
   
Return
   AEE_SUCCESS     Successfully wrote bytes or in WOULDBLOCK state, call writeable 
                   if (*pcbWrote != cbLen)
   EBADSTATE       LoadSource operation is pending, cannot accept Write
Side Effect
None
Comment
None
  • Follow