TCNullStream.cpp 904 B

1234567891011121314151617181920212223
  1. /////////////////////////////////////////////////////////////////////////////
  2. // TCNullStream.cpp | Implementation of the CTCNullStream class, which
  3. // implements the CLSID_TCNullStream component object.<nl><nl>
  4. // This object provides an implementation of the IStream interface that does
  5. // nothing more that count the number of bytes being written to it. Since
  6. // ATL (currently 3.0) implements IPersistStreamInitImpl::GetSizeMax by
  7. // returning E_NOTIMPL, this object can be used in an override of that
  8. // method. This is accomplished by creating an instance of this null stream
  9. // and 'persisting' an object to it, thereby counting the number of bytes
  10. // needed to persist the object without allocating any memory.
  11. //
  12. #include "pch.h"
  13. #include "TCNullStream.h"
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CTCNullStream
  16. TC_OBJECT_EXTERN_IMPL(CTCNullStream)