mirror of
https://github.com/reactos/reactos.git
synced 2025-06-03 00:10:39 +00:00
[RAPPS] Use _beginthreadex instead of CreateThread (#2552)
This commit is contained in:
parent
0b948581fc
commit
2ac13afefc
1 changed files with 5 additions and 4 deletions
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
#include <rosctrls.h>
|
#include <rosctrls.h>
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
|
#include <process.h>
|
||||||
#undef SubclassWindow
|
#undef SubclassWindow
|
||||||
|
|
||||||
#include "rosui.h"
|
#include "rosui.h"
|
||||||
|
@ -355,7 +356,7 @@ public:
|
||||||
static VOID Add(DownloadInfo info);
|
static VOID Add(DownloadInfo info);
|
||||||
static VOID Download(const DownloadInfo& DLInfo, BOOL bIsModal = FALSE);
|
static VOID Download(const DownloadInfo& DLInfo, BOOL bIsModal = FALSE);
|
||||||
static INT_PTR CALLBACK DownloadDlgProc(HWND Dlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
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);
|
static VOID LaunchDownloadDialog(BOOL);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -432,8 +433,8 @@ INT_PTR CALLBACK CDownloadManager::DownloadDlgProc(HWND Dlg, UINT uMsg, WPARAM w
|
||||||
|
|
||||||
// Start download process
|
// Start download process
|
||||||
DownloadParam *param = new DownloadParam(Dlg, AppsToInstallList, szCaption);
|
DownloadParam *param = new DownloadParam(Dlg, AppsToInstallList, szCaption);
|
||||||
DWORD ThreadId;
|
unsigned int ThreadId;
|
||||||
HANDLE Thread = CreateThread(NULL, 0, ThreadFunc, (LPVOID) param, 0, &ThreadId);
|
HANDLE Thread = (HANDLE)_beginthreadex(NULL, 0, ThreadFunc, (void *) param, 0, &ThreadId);
|
||||||
|
|
||||||
if (!Thread)
|
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;
|
ATL::CStringW Path;
|
||||||
PWSTR p, q;
|
PWSTR p, q;
|
||||||
|
|
Loading…
Reference in a new issue