mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 09:14:58 -06:00
4.46 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
a145bfc7cf
commit
c574fc0f4b
@@ -25,7 +25,7 @@ bool CInFileStream::Open(LPCTSTR fileName)
|
||||
return File.Open(fileName);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_WIN_FILE
|
||||
#ifndef _UNICODE
|
||||
bool CInFileStream::Open(LPCWSTR fileName)
|
||||
{
|
||||
@@ -34,9 +34,23 @@ bool CInFileStream::Open(LPCWSTR fileName)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool CInFileStream::OpenShared(LPCTSTR fileName, bool shareForWrite)
|
||||
{
|
||||
return File.OpenShared(fileName, shareForWrite);
|
||||
}
|
||||
|
||||
#ifdef USE_WIN_FILE
|
||||
#ifndef _UNICODE
|
||||
bool CInFileStream::OpenShared(LPCWSTR fileName, bool shareForWrite)
|
||||
{
|
||||
return File.OpenShared(fileName, shareForWrite);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
STDMETHODIMP CInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_WIN_FILE
|
||||
|
||||
UInt32 realProcessedSize;
|
||||
bool result = File.ReadPart(data, size, realProcessedSize);
|
||||
@@ -98,7 +112,7 @@ STDMETHODIMP CInFileStream::Seek(Int64 offset, UInt32 seekOrigin,
|
||||
if(seekOrigin >= 3)
|
||||
return STG_E_INVALIDFUNCTION;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_WIN_FILE
|
||||
|
||||
UInt64 realNewPosition;
|
||||
bool result = File.Seek(offset, seekOrigin, realNewPosition);
|
||||
@@ -132,7 +146,7 @@ bool COutFileStream::Create(LPCTSTR fileName, bool createAlways)
|
||||
return File.Create(fileName, createAlways);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_WIN_FILE
|
||||
#ifndef _UNICODE
|
||||
bool COutFileStream::Create(LPCWSTR fileName, bool createAlways)
|
||||
{
|
||||
@@ -143,7 +157,7 @@ bool COutFileStream::Create(LPCWSTR fileName, bool createAlways)
|
||||
|
||||
STDMETHODIMP COutFileStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_WIN_FILE
|
||||
|
||||
UInt32 realProcessedSize;
|
||||
bool result = File.WritePart(data, size, realProcessedSize);
|
||||
@@ -170,7 +184,7 @@ STDMETHODIMP COutFileStream::Seek(Int64 offset, UInt32 seekOrigin,
|
||||
{
|
||||
if(seekOrigin >= 3)
|
||||
return STG_E_INVALIDFUNCTION;
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_WIN_FILE
|
||||
|
||||
UInt64 realNewPosition;
|
||||
bool result = File.Seek(offset, seekOrigin, realNewPosition);
|
||||
@@ -192,7 +206,7 @@ STDMETHODIMP COutFileStream::Seek(Int64 offset, UInt32 seekOrigin,
|
||||
|
||||
STDMETHODIMP COutFileStream::SetSize(Int64 newSize)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#ifdef USE_WIN_FILE
|
||||
UInt64 currentPos;
|
||||
if(!File.Seek(0, FILE_CURRENT, currentPos))
|
||||
return E_FAIL;
|
||||
|
||||
Reference in New Issue
Block a user