mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[RAPPS] Use _beginthreadex instead of CreateThread (#2552)
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
|
||||
#include <rosctrls.h>
|
||||
#include <windowsx.h>
|
||||
#include <process.h>
|
||||
#undef SubclassWindow
|
||||
|
||||
#include "rosui.h"
|
||||
@@ -355,7 +356,7 @@ public:
|
||||
static VOID Add(DownloadInfo info);
|
||||
static VOID Download(const DownloadInfo& DLInfo, BOOL bIsModal = FALSE);
|
||||
static INT_PTR CALLBACK DownloadDlgProc(HWND Dlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static DWORD WINAPI ThreadFunc(LPVOID Context);
|
||||
static unsigned int WINAPI ThreadFunc(LPVOID Context);
|
||||
static VOID LaunchDownloadDialog(BOOL);
|
||||
};
|
||||
|
||||
@@ -432,8 +433,8 @@ INT_PTR CALLBACK CDownloadManager::DownloadDlgProc(HWND Dlg, UINT uMsg, WPARAM w
|
||||
|
||||
// Start download process
|
||||
DownloadParam *param = new DownloadParam(Dlg, AppsToInstallList, szCaption);
|
||||
DWORD ThreadId;
|
||||
HANDLE Thread = CreateThread(NULL, 0, ThreadFunc, (LPVOID) param, 0, &ThreadId);
|
||||
unsigned int ThreadId;
|
||||
HANDLE Thread = (HANDLE)_beginthreadex(NULL, 0, ThreadFunc, (void *) param, 0, &ThreadId);
|
||||
|
||||
if (!Thread)
|
||||
{
|
||||
@@ -507,7 +508,7 @@ VOID CDownloadManager::UpdateProgress(
|
||||
}
|
||||
}
|
||||
|
||||
DWORD WINAPI CDownloadManager::ThreadFunc(LPVOID param)
|
||||
unsigned int WINAPI CDownloadManager::ThreadFunc(LPVOID param)
|
||||
{
|
||||
ATL::CStringW Path;
|
||||
PWSTR p, q;
|
||||
|
||||
Reference in New Issue
Block a user