summaryrefslogtreecommitdiffstats
path: root/CPP/7zip/Archive/Common/DummyOutStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Archive/Common/DummyOutStream.cpp')
-rwxr-xr-xCPP/7zip/Archive/Common/DummyOutStream.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/CPP/7zip/Archive/Common/DummyOutStream.cpp b/CPP/7zip/Archive/Common/DummyOutStream.cpp
new file mode 100755
index 0000000..237e01e
--- /dev/null
+++ b/CPP/7zip/Archive/Common/DummyOutStream.cpp
@@ -0,0 +1,22 @@
+// DummyOutStream.cpp
+
+#include "StdAfx.h"
+
+#include "DummyOutStream.h"
+
+STDMETHODIMP CDummyOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
+{
+ UInt32 realProcessedSize;
+ HRESULT result;
+ if(!_stream)
+ {
+ realProcessedSize = size;
+ result = S_OK;
+ }
+ else
+ result = _stream->Write(data, size, &realProcessedSize);
+ _size += realProcessedSize;
+ if(processedSize != NULL)
+ *processedSize = realProcessedSize;
+ return result;
+}