mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-09 08:07:19 -06:00
21.02
This commit is contained in:
@@ -17,8 +17,8 @@ class COutMemStream:
|
||||
bool _realStreamMode;
|
||||
|
||||
bool _unlockEventWasSent;
|
||||
NWindows::NSynchronization::CAutoResetEvent StopWritingEvent;
|
||||
NWindows::NSynchronization::CAutoResetEvent WriteToRealStreamEvent;
|
||||
NWindows::NSynchronization::CAutoResetEvent_WFMO StopWritingEvent;
|
||||
NWindows::NSynchronization::CAutoResetEvent_WFMO WriteToRealStreamEvent;
|
||||
// NWindows::NSynchronization::CAutoResetEvent NoLockEvent;
|
||||
|
||||
HRESULT StopWriteResult;
|
||||
@@ -31,10 +31,13 @@ class COutMemStream:
|
||||
|
||||
public:
|
||||
|
||||
HRes CreateEvents()
|
||||
|
||||
HRes CreateEvents(SYNC_PARAM_DECL(synchro))
|
||||
{
|
||||
RINOK(StopWritingEvent.CreateIfNotCreated());
|
||||
return WriteToRealStreamEvent.CreateIfNotCreated();
|
||||
WRes wres = StopWritingEvent.CreateIfNotCreated_Reset(SYNC_WFMO(synchro));
|
||||
if (wres == 0)
|
||||
wres = WriteToRealStreamEvent.CreateIfNotCreated_Reset(SYNC_WFMO(synchro));
|
||||
return HRESULT_FROM_WIN32(wres);
|
||||
}
|
||||
|
||||
void SetOutStream(IOutStream *outStream)
|
||||
@@ -55,7 +58,16 @@ public:
|
||||
OutSeqStream.Release();
|
||||
}
|
||||
|
||||
COutMemStream(CMemBlockManagerMt *memManager): _memManager(memManager) { }
|
||||
COutMemStream(CMemBlockManagerMt *memManager):
|
||||
_memManager(memManager)
|
||||
{
|
||||
/*
|
||||
#ifndef _WIN32
|
||||
StopWritingEvent._sync =
|
||||
WriteToRealStreamEvent._sync = &memManager->Synchro;
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
~COutMemStream() { Free(); }
|
||||
void Free();
|
||||
|
||||
Reference in New Issue
Block a user