streampos ostream::tellp() { streampos retval; lockbuf(); if ((retval=bp->seekoff(streamoff(0), ios::cur, ios::out))==EOF) clear(state | failbit); unlockbuf(); return(retval); }
void YWinCEOStream::UnSubscribe() { lockbuf(); ((YWinCEOStreamBuffer*)bp)->m_hWnd=NULL; ((YWinCEOStreamBuffer*)bp)->m_pCB = NULL; unlockbuf(); }
ostream& ostream::seekp(streamoff _strmf, seek_dir _sd) { lockbuf(); if (bp->seekoff(_strmf, _sd, ios::out)==EOF) clear(state | failbit); unlockbuf(); return(*this); }
ostream& ostream::seekp(streampos _strmp) { lockbuf(); if (bp->seekpos(_strmp, ios::out)==EOF) clear(state | failbit); unlockbuf(); return(*this); }
ostream& ostream::flush() { lock(); lockbuf(); if (bp && bp->sync()==EOF) state |= ios::failbit; unlockbuf(); unlock(); return(*this); }
void YWinCEOStream::Subscribe(YWinCEOStreamCB pCB) { lockbuf(); if (bp) { ((YWinCEOStreamBuffer*)bp)->m_hWnd = NULL; ((YWinCEOStreamBuffer*)bp)->m_pCB = pCB; } unlockbuf(); }
void YWinCEOStream::Subscribe(HWND Reciever,UINT MessageID) { lockbuf(); if (bp) { ((YWinCEOStreamBuffer*)bp)->m_hWnd = Reciever; ((YWinCEOStreamBuffer*)bp)->m_MessageID = MessageID; ((YWinCEOStreamBuffer*)bp)->m_pCB = NULL; } unlockbuf(); }
int ostream::opfx() { lock(); if (state) { state |= ios::failbit; unlock(); return 0; } if (x_tie) { x_tie->flush(); } lockbuf(); return(1); // return non-zero }