Skip to content

Commit

Permalink
Fix Drag & Drop from results window not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
TautvydasZilys committed May 24, 2022
1 parent 6e380f1 commit 810028d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SearchResultsView/ExplorerWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ ExplorerWindow::ExplorerWindow(HWND parent, int width, int height, bool dpiAware
m_IsDPIAware(dpiAware),
m_ResultDispatcherThreadId(0)
{
auto hr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
// Required for Drag & Drop to work
auto hr = OleInitialize(nullptr);
Assert(SUCCEEDED(hr));

EnsureWindowClassIsCreated();
Expand All @@ -66,7 +67,7 @@ ExplorerWindow::~ExplorerWindow()
m_BindCtx = nullptr;
m_FileSystemBindData = nullptr;

CoUninitialize();
OleUninitialize();

DestroyWindow(m_Hwnd);
}
Expand Down

0 comments on commit 810028d

Please sign in to comment.