vcl/win/dtrans/source.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit 54add6c702cfef4898ae750caa98c3d18c6f60a3 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Jan 7 13:45:52 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Jan 7 19:08:32 2022 +0100 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.kagan...@collabora.com> 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");