diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-01-07 13:45:52 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-01-07 19:08:32 +0100 |
commit | 54add6c702cfef4898ae750caa98c3d18c6f60a3 (patch) | |
tree | 91a8746b039d99147ab416ed274742830f4298fd | |
parent | 97e2dc2ed0c4602c7823bdd6c6d5376e8da60c62 (diff) |
Use CreateThread instead of _beginthreadex
Change-Id: Idae8112f0684f6d3aac70c4450eedc77e48432dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128121
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | vcl/win/dtrans/source.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/win/dtrans/source.cxx b/vcl/win/dtrans/source.cxx index 34471730bcd3..d91e39b026e0 100644 --- a/vcl/win/dtrans/source.cxx +++ b/vcl/win/dtrans/source.cxx @@ -48,7 +48,7 @@ using namespace com::sun::star::awt::MouseButton; using namespace com::sun::star::awt; using namespace com::sun::star::lang; -static unsigned __stdcall DndOleSTAFunc(LPVOID pParams); +static DWORD WINAPI DndOleSTAFunc(_In_ LPVOID pParams); DragSource::DragSource( const Reference<XComponentContext>& rxContext): WeakComponentImplHelper< XDragSource, XInitialization, XServiceInfo >(m_aMutex), @@ -120,9 +120,8 @@ void DragSource::StartDragImpl( // The thread accesses members of this instance but does not call acquire. // Hopefully this instance is not destroyed before the thread has terminated. - unsigned threadId; - HANDLE hThread= reinterpret_cast<HANDLE>(_beginthreadex( - nullptr, 0, DndOleSTAFunc, this, 0, &threadId)); + DWORD threadId; + HANDLE hThread = CreateThread(nullptr, 0, DndOleSTAFunc, this, 0, &threadId); // detach from thread CloseHandle(hThread); @@ -305,7 +304,7 @@ dtrans_DragSource_get_implementation( carries out a drag and drop operation by calling DoDragDrop. The thread also notifies all XSourceListener. */ -unsigned __stdcall DndOleSTAFunc(LPVOID pParams) +DWORD WINAPI DndOleSTAFunc(_In_ LPVOID pParams) { osl_setThreadName("DragSource DndOleSTAFunc"); |