4.46 beta

This commit is contained in:
Igor Pavlov
2007-05-25 00:00:00 +00:00
committed by Kornel Lesiński
parent a145bfc7cf
commit c574fc0f4b
191 changed files with 1318 additions and 854 deletions

View File

@@ -680,6 +680,15 @@ SOURCE=..\..\..\C\Sort.c
SOURCE=..\..\..\C\Sort.h
# End Source File
# Begin Source File
SOURCE=..\..\..\C\Threads.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\..\C\Threads.h
# End Source File
# End Group
# Begin Group "Windows"

View File

@@ -41,7 +41,7 @@ struct CThreadExtractInArchive2
return 0;
}
static DWORD WINAPI MyThreadFunction(void *param)
static THREAD_FUNC_DECL MyThreadFunction(void *param)
{
return ((CThreadExtractInArchive2 *)param)->Extract();
}
@@ -84,9 +84,8 @@ HRESULT CPanel::CopyTo(const CRecordVector<UInt32> &indices, const UString &fold
extracter.FolderOperations = folderOperations;
extracter.MoveMode = moveMode;
CThread extractThread;
if (!extractThread.Create(CThreadExtractInArchive2::MyThreadFunction, &extracter))
throw 271824;
NWindows::CThread extractThread;
RINOK(extractThread.Create(CThreadExtractInArchive2::MyThreadFunction, &extracter));
extracter.ExtractCallbackSpec->StartProgressDialog(title);
if (messages != 0)
@@ -118,7 +117,7 @@ struct CThreadUpdate
return 0;
}
static DWORD WINAPI MyThreadFunction(void *param)
static THREAD_FUNC_DECL MyThreadFunction(void *param)
{
return ((CThreadUpdate *)param)->Process();
}
@@ -161,9 +160,8 @@ HRESULT CPanel::CopyFrom(const UString &folderPrefix, const UStringVector &fileP
for(i = 0; i < updater.FileNames.Size(); i++)
updater.FileNamePointers.Add(updater.FileNames[i]);
CThread thread;
if (!thread.Create(CThreadUpdate::MyThreadFunction, &updater))
throw 271824;
NWindows::CThread thread;
RINOK(thread.Create(CThreadUpdate::MyThreadFunction, &updater));
updater.UpdateCallbackSpec->StartProgressDialog(title);
if (messages != 0)

View File

@@ -253,7 +253,7 @@ struct CThreadCrc
return 0;
}
static DWORD WINAPI MyThreadFunction(void *param)
static THREAD_FUNC_DECL MyThreadFunction(void *param)
{
return ((CThreadCrc *)param)->Process();
}
@@ -303,9 +303,9 @@ void CApp::CalculateCrc()
progressDialog.MainTitle = progressWindowTitle;
progressDialog.MainAddTitle = title + UString(L" ");
CThread thread;
if (!thread.Create(CThreadCrc::MyThreadFunction, &combiner))
throw 271824;
NWindows::CThread thread;
if (thread.Create(CThreadCrc::MyThreadFunction, &combiner) != S_OK)
return;
progressDialog.Create(title, _window);
if (combiner.Result != S_OK)

View File

@@ -380,12 +380,16 @@ public:
class CExitEventLauncher
{
public:
CManualResetEvent _exitEvent;
CExitEventLauncher(): _exitEvent(false) {};
NWindows::NSynchronization::CManualResetEvent _exitEvent;
CExitEventLauncher()
{
if (_exitEvent.Create(false) != S_OK)
throw 9387173;
};
~CExitEventLauncher() { _exitEvent.Set(); }
} g_ExitEventLauncher;
static DWORD WINAPI MyThreadFunction(void *param)
static THREAD_FUNC_DECL MyThreadFunction(void *param)
{
CMyAutoPtr<CTmpProcessInfo> tmpProcessInfoPtr((CTmpProcessInfo *)param);
CTmpProcessInfo *tmpProcessInfo = tmpProcessInfoPtr.get();
@@ -502,8 +506,8 @@ void CPanel::OpenItemInArchive(int index, bool tryInternal, bool tryExternal,
tmpProcessInfo->ItemName = name;
tmpProcessInfo->ProcessHandle = hProcess;
CThread thread;
if (!thread.Create(MyThreadFunction, tmpProcessInfo))
NWindows::CThread thread;
if (thread.Create(MyThreadFunction, tmpProcessInfo) != S_OK)
throw 271824;
tempDirectory.DisableDeleting();
tmpProcessInfoPtr.release();

View File

@@ -45,7 +45,7 @@ struct CThreadDelete
return 0;
}
static DWORD WINAPI MyThreadFunction(void *param)
static THREAD_FUNC_DECL MyThreadFunction(void *param)
{
return ((CThreadDelete *)param)->Process();
}
@@ -211,8 +211,8 @@ void CPanel::DeleteItemsInternal(CRecordVector<UInt32> &indices)
deleter.FolderOperations = folderOperations;
deleter.Indices = indices;
CThread thread;
if (!thread.Create(CThreadDelete::MyThreadFunction, &deleter))
NWindows::CThread thread;
if (thread.Create(CThreadDelete::MyThreadFunction, &deleter) != S_OK)
throw 271824;
deleter.UpdateCallbackSpec->StartProgressDialog(progressTitle);

View File

@@ -181,7 +181,7 @@ struct CThreadSplit
return 0;
}
static DWORD WINAPI MyThreadFunction(void *param)
static THREAD_FUNC_DECL MyThreadFunction(void *param)
{
return ((CThreadSplit *)param)->Process();
}
@@ -280,8 +280,8 @@ void CApp::Split()
// CPanel::CDisableTimerProcessing disableTimerProcessing1(srcPanel);
// CPanel::CDisableTimerProcessing disableTimerProcessing2(destPanel);
CThread thread;
if (!thread.Create(CThreadSplit::MyThreadFunction, &spliter))
NWindows::CThread thread;
if (thread.Create(CThreadSplit::MyThreadFunction, &spliter) != S_OK)
throw 271824;
progressDialog.Create(title, _window);
@@ -395,7 +395,7 @@ struct CThreadCombine
return 0;
}
static DWORD WINAPI MyThreadFunction(void *param)
static THREAD_FUNC_DECL MyThreadFunction(void *param)
{
return ((CThreadCombine *)param)->Process();
}
@@ -467,8 +467,8 @@ void CApp::Combine()
// CPanel::CDisableTimerProcessing disableTimerProcessing1(srcPanel);
// CPanel::CDisableTimerProcessing disableTimerProcessing2(destPanel);
CThread thread;
if (!thread.Create(CThreadCombine::MyThreadFunction, &combiner))
NWindows::CThread thread;
if (thread.Create(CThreadCombine::MyThreadFunction, &combiner) != S_OK)
throw 271824;
progressDialog.Create(title, _window);

View File

@@ -10,7 +10,7 @@ using namespace NRegistry;
static const TCHAR *kCUBasePath = TEXT("Software\\7-ZIP");
static const TCHAR *kCU_FMPath = TEXT("Software\\7-ZIP\\FM");
static const TCHAR *kLM_Path = TEXT("Software\\7-ZIP\\FM");
// static const TCHAR *kLM_Path = TEXT("Software\\7-ZIP\\FM");
static const WCHAR *kLangValueName = L"Lang";
static const WCHAR *kEditor = L"Editor";
@@ -21,7 +21,7 @@ static const TCHAR *kShowSystemMenu = TEXT("ShowSystemMenu");
static const TCHAR *kFullRow = TEXT("FullRow");
static const TCHAR *kShowGrid = TEXT("ShowGrid");
static const TCHAR *kAlternativeSelection = TEXT("AlternativeSelection");
static const TCHAR *kLockMemoryAdd = TEXT("LockMemoryAdd");
// static const TCHAR *kLockMemoryAdd = TEXT("LockMemoryAdd");
static const TCHAR *kLargePagesEnable = TEXT("LargePages");
// static const TCHAR *kSingleClick = TEXT("SingleClick");
// static const TCHAR *kUnderline = TEXT("Underline");

View File

@@ -105,7 +105,10 @@ public:
#ifndef _SFX
,MainWindow(0)
#endif
{}
{
if (_dialogCreatedEvent.Create() != S_OK)
throw 1334987;
}
void WaitCreating() { _dialogCreatedEvent.Lock(); }

View File

@@ -163,7 +163,10 @@ public:
#ifndef _SFX
,MainWindow(0)
#endif
{}
{
if (_dialogCreatedEvent.Create() != S_OK)
throw 1334987;
}
void WaitCreating() { _dialogCreatedEvent.Lock(); }

View File

@@ -108,8 +108,9 @@ UI_COMMON_OBJS = \
$O\PropIDUtils.obj \
C_OBJS = \
$O\Sort.obj \
$O\Alloc.obj \
$O\Sort.obj \
$O\Threads.obj \
!include "../Crc2.mak"