Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Common/FileStreams.h')
-rwxr-xr-xCPP/7zip/Common/FileStreams.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/CPP/7zip/Common/FileStreams.h b/CPP/7zip/Common/FileStreams.h
index 9326372a..a65c96e1 100755
--- a/CPP/7zip/Common/FileStreams.h
+++ b/CPP/7zip/Common/FileStreams.h
@@ -4,6 +4,10 @@
#define __FILESTREAMS_H
#ifdef _WIN32
+#define USE_WIN_FILE
+#endif
+
+#ifdef USE_WIN_FILE
#include "../../Windows/FileIO.h"
#else
#include "../../Common/C_FileIO.h"
@@ -18,7 +22,7 @@ class CInFileStream:
public CMyUnknownImp
{
public:
- #ifdef _WIN32
+ #ifdef USE_WIN_FILE
NWindows::NFile::NIO::CInFile File;
#else
NC::NFile::NIO::CInFile File;
@@ -27,12 +31,19 @@ public:
virtual ~CInFileStream() {}
bool Open(LPCTSTR fileName);
- #ifdef _WIN32
+ #ifdef USE_WIN_FILE
#ifndef _UNICODE
bool Open(LPCWSTR fileName);
#endif
#endif
+ bool OpenShared(LPCTSTR fileName, bool shareForWrite);
+ #ifdef USE_WIN_FILE
+ #ifndef _UNICODE
+ bool OpenShared(LPCWSTR fileName, bool shareForWrite);
+ #endif
+ #endif
+
MY_UNKNOWN_IMP2(IInStream, IStreamGetSize)
STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
@@ -62,14 +73,14 @@ class COutFileStream:
public CMyUnknownImp
{
public:
- #ifdef _WIN32
+ #ifdef USE_WIN_FILE
NWindows::NFile::NIO::COutFile File;
#else
NC::NFile::NIO::COutFile File;
#endif
virtual ~COutFileStream() {}
bool Create(LPCTSTR fileName, bool createAlways);
- #ifdef _WIN32
+ #ifdef USE_WIN_FILE
#ifndef _UNICODE
bool Create(LPCWSTR fileName, bool createAlways);
#endif