Exemple #1
4
streampos ostream::tellp()
{
    streampos retval;
    lockbuf();

    if ((retval=bp->seekoff(streamoff(0), ios::cur, ios::out))==EOF)
        clear(state | failbit);

    unlockbuf();
    return(retval);
}
Exemple #2
0
void YWinCEOStream::UnSubscribe()
{
	lockbuf();
	((YWinCEOStreamBuffer*)bp)->m_hWnd=NULL;
	((YWinCEOStreamBuffer*)bp)->m_pCB = NULL;
	unlockbuf();
}
Exemple #3
0
ostream& ostream::seekp(streamoff _strmf, seek_dir _sd)
{
    lockbuf();

    if (bp->seekoff(_strmf, _sd, ios::out)==EOF)
        clear(state | failbit);

    unlockbuf();
    return(*this);
}
Exemple #4
0
ostream& ostream::seekp(streampos _strmp)
{
    lockbuf();

    if (bp->seekpos(_strmp, ios::out)==EOF)
        clear(state | failbit);

    unlockbuf();
    return(*this);
}
Exemple #5
0
ostream& ostream::flush()
{
    lock();
    lockbuf();
    if (bp && bp->sync()==EOF)
        state |= ios::failbit;
    unlockbuf();
    unlock();
    return(*this);
}
Exemple #6
0
void YWinCEOStream::Subscribe(YWinCEOStreamCB pCB)
{
	lockbuf();
	if (bp)
	{
		((YWinCEOStreamBuffer*)bp)->m_hWnd = NULL;
		((YWinCEOStreamBuffer*)bp)->m_pCB = pCB;
	}
	unlockbuf();
}
Exemple #7
0
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();
}
Exemple #8
0
int ostream::opfx()
{
    lock();
    if (state)
	{
        state |= ios::failbit;
        unlock();
        return 0;
	}
    if (x_tie)
	{
        x_tie->flush();
	}
    lockbuf();
    return(1);  // return non-zero
}