https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2ac13afefc439a7bc1cfa…
commit 2ac13afefc439a7bc1cfa13e44027113fbf8f96a
Author: He Yang <1160386205(a)qq.com>
AuthorDate: Fri Apr 17 12:27:16 2020 -0500
Commit: GitHub <noreply(a)github.com>
CommitDate: Fri Apr 17 19:27:16 2020 +0200
[RAPPS] Use _beginthreadex instead of CreateThread (#2552)
---
base/applications/rapps/loaddlg.cpp | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/base/applications/rapps/loaddlg.cpp b/base/applications/rapps/loaddlg.cpp
index 213e4afb3ab..4ee4cb518fb 100644
--- a/base/applications/rapps/loaddlg.cpp
+++ b/base/applications/rapps/loaddlg.cpp
@@ -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;