共用方式為


CArchive::IsBufferEmpty

Call this member function to determine whether the archive object's internal buffer is empty.

BOOL IsBufferEmpty( ) const;

Return Value

Nonzero if the archive's buffer is empty; otherwise 0.

Remarks

This function is supplied to support programming with the MFC Windows Sockets class CSocketFile. You do not need to use it for an archive associated with a CFile object.

The reason for using IsBufferEmpty with an archive associated with a CSocketFile object is that the archive's buffer might contain more than one message or record. After receiving one message, you should use IsBufferEmpty to control a loop that continues receiving data until the buffer is empty. For more information, see the Receive member function of class CAsyncSocket, which shows how to use IsBufferEmpty.

For more information, see Windows Sockets: Using Sockets with Archives.

Requirements

Header: afx.h

See Also

Reference

CArchive Class

Hierarchy Chart

CSocketFile Class

CAsyncSocket::Receive

Other Resources

CArchive Members