diff options
-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"); |