MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / EnsureWindowsSystemDispatcherQueueController

Method EnsureWindowsSystemDispatcherQueueController

FastCopy/AcrylicHelper.cpp:11–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include "ViewModelLocator.h"
10
11void AcrylicHelper::EnsureWindowsSystemDispatcherQueueController()
12{
13 if (winrt::Windows::System::DispatcherQueue::GetForCurrentThread() != nullptr)
14 return;
15
16
17 DispatcherQueueOptions options
18 {
19 };
20 options.dwSize = sizeof(options);
21 options.apartmentType = DQTAT_COM_STA;
22 options.threadType = DQTYPE_THREAD_CURRENT;
23
24 ABI::Windows::System::IDispatcherQueueController* pt{};
25 winrt::check_hresult(CreateDispatcherQueueController(options, &pt));
26}
27
28AcrylicHelper::AcrylicHelper(winrt::Microsoft::UI::Xaml::Window& window, AcrylicParameter parameter):m_window{window}
29{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected