mirror of
https://github.com/LibreOffice/core.git
synced 2025-07-23 04:42:03 +00:00
Use CreateThread instead of _beginthreadex
Change-Id: I7c272880d6567bc669d4c3c2684aa2e0daeca1b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128120 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@ -246,8 +246,8 @@ CMtaOleClipboard::CMtaOleClipboard( ) :
|
||||
|
||||
s_theMtaOleClipboardInst = this;
|
||||
|
||||
m_hOleThread = reinterpret_cast<HANDLE>(_beginthreadex(
|
||||
nullptr, 0, CMtaOleClipboard::oleThreadProc, this, 0, &m_uOleThreadId ));
|
||||
m_hOleThread = CreateThread(
|
||||
nullptr, 0, CMtaOleClipboard::oleThreadProc, this, 0, &m_uOleThreadId );
|
||||
OSL_ASSERT( nullptr != m_hOleThread );
|
||||
|
||||
// setup the clipboard changed notifier thread
|
||||
@ -258,9 +258,9 @@ CMtaOleClipboard::CMtaOleClipboard( ) :
|
||||
m_hClipboardChangedNotifierEvents[1] = CreateEventW( nullptr, MANUAL_RESET, INIT_NONSIGNALED, nullptr );
|
||||
OSL_ASSERT( nullptr != m_hClipboardChangedNotifierEvents[1] );
|
||||
|
||||
unsigned uThreadId;
|
||||
m_hClipboardChangedNotifierThread = reinterpret_cast<HANDLE>(_beginthreadex(
|
||||
nullptr, 0, CMtaOleClipboard::clipboardChangedNotifierThreadProc, this, 0, &uThreadId ));
|
||||
DWORD uThreadId;
|
||||
m_hClipboardChangedNotifierThread = CreateThread(
|
||||
nullptr, 0, CMtaOleClipboard::clipboardChangedNotifierThreadProc, this, 0, &uThreadId );
|
||||
|
||||
OSL_ASSERT( nullptr != m_hClipboardChangedNotifierThread );
|
||||
}
|
||||
@ -680,7 +680,7 @@ unsigned int CMtaOleClipboard::run( )
|
||||
return nRet;
|
||||
}
|
||||
|
||||
unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
|
||||
DWORD WINAPI CMtaOleClipboard::oleThreadProc( _In_ LPVOID pParam )
|
||||
{
|
||||
osl_setThreadName("CMtaOleClipboard::run()");
|
||||
|
||||
@ -691,7 +691,7 @@ unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
|
||||
return pInst->run( );
|
||||
}
|
||||
|
||||
unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID pParam )
|
||||
DWORD WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( _In_ LPVOID pParam )
|
||||
{
|
||||
osl_setThreadName("CMtaOleClipboard::clipboardChangedNotifierThreadProc()");
|
||||
CMtaOleClipboard* pInst = static_cast< CMtaOleClipboard* >( pParam );
|
||||
|
@ -75,15 +75,15 @@ private:
|
||||
LRESULT onClipboardUpdate();
|
||||
|
||||
static LRESULT CALLBACK mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
static unsigned int WINAPI oleThreadProc( LPVOID pParam );
|
||||
static DWORD WINAPI oleThreadProc( _In_ LPVOID pParam );
|
||||
|
||||
static unsigned int WINAPI clipboardChangedNotifierThreadProc( LPVOID pParam );
|
||||
static DWORD WINAPI clipboardChangedNotifierThreadProc( _In_ LPVOID pParam );
|
||||
|
||||
bool WaitForThreadReady( ) const;
|
||||
|
||||
private:
|
||||
HANDLE m_hOleThread;
|
||||
unsigned m_uOleThreadId;
|
||||
DWORD m_uOleThreadId;
|
||||
HANDLE m_hEvtThrdReady;
|
||||
HWND m_hwndMtaOleReqWnd;
|
||||
HANDLE m_hEvtWndDisposed;
|
||||
@ -103,12 +103,8 @@ private:
|
||||
|
||||
static CMtaOleClipboard* s_theMtaOleClipboardInst;
|
||||
|
||||
// not allowed
|
||||
private:
|
||||
CMtaOleClipboard( const CMtaOleClipboard& );
|
||||
CMtaOleClipboard& operator=( const CMtaOleClipboard& );
|
||||
|
||||
friend LRESULT CALLBACK mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
CMtaOleClipboard( const CMtaOleClipboard& ) = delete;
|
||||
CMtaOleClipboard& operator=( const CMtaOleClipboard& ) = delete;
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
Reference in New Issue
Block a user