\lib\dtrans\source\win32\dnd\target.cxx void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException) {
........... m_hOleThread= CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)DndTargetOleSTAFunc, &m_evtThreadReady, 0, &m_threadIdTarget); WaitForSingleObject( m_evtThreadReady, INFINITE); ........... } DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams) { HRESULT hr= OleInitialize( NULL); if( SUCCEEDED( hr) ) { MSG msg; // force the creation of a message queue PeekMessage( &msg, (HWND)NULL, 0, 0, PM_NOREMOVE); // Signal the creator ( DropTarget::initialize) that the thread is // ready to receive messages. SetEvent( *(HANDLE*) pParams); ........... } // no SetEvent( *(HANDLE*) pParams); action this branch. } If OleInitialize() inside DndTargetOleSTAFunc failed, DropTarget::initialize will wait the m_evtThreadReady event forever. Could this cause freezing problem?