vcl/source/app/svmain.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7cdae23d690921349737c5da30ea7bc125ad2d2e
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Jan 7 13:22:05 2022 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Fri Jan 7 18:21:27 2022 +0100

    Use CreateThread instead of _beginthreadex
    
    Change-Id: I5633674ba7dcb03d9ad3049fa5eb380d385983b4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128119
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 749b5a97f098..389a84777a2a 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -628,7 +628,7 @@ struct WorkerThreadData
 
 #ifdef _WIN32
 static HANDLE hThreadID = nullptr;
-static unsigned __stdcall threadmain( void *pArgs )
+static DWORD WINAPI threadmain( _In_ LPVOID pArgs )
 {
     OleInitialize( nullptr );
     static_cast<WorkerThreadData*>(pArgs)->pWorker( 
static_cast<WorkerThreadData*>(pArgs)->pThreadData );
@@ -655,14 +655,14 @@ void CreateMainLoopThread( oslWorkerFunction pWorker, 
void * pThreadData )
 #ifdef _WIN32
     // sal thread always call CoInitializeEx, so a system dependent 
implementation is necessary
 
-    unsigned uThreadID;
-    hThreadID = reinterpret_cast<HANDLE>(_beginthreadex(
+    DWORD uThreadID;
+    hThreadID = CreateThread(
         nullptr,       // no security handle
         0,          // stacksize 0 means default
         threadmain,    // thread worker function
         new WorkerThreadData( pWorker, pThreadData ),       // arguments for 
worker function
         0,          // 0 means: create immediately otherwise use 
CREATE_SUSPENDED
-        &uThreadID ));   // thread id to fill
+        &uThreadID );   // thread id to fill
 #else
     hThreadID = osl_createThread( MainWorkerFunction, new WorkerThreadData( 
pWorker, pThreadData ) );
 #endif

Reply via email to