MCPcopy Create free account
hub / github.com/WinDurango/WinDurango / QueryInterface

Method QueryInterface

projects/WinDurango.KernelX/src/EraCoreWindow.cpp:241–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239{
240 if (riid == __uuidof(IUnknown) || riid == __uuidof(IInspectable) || riid == __uuidof(ICoreWindowEra) ||
241 riid == __uuidof(IAgileObject))
242 {
243 *ppvObject = this;
244 AddRef();
245 return S_OK;
246 }
247
248 char iidstr[sizeof("{AAAAAAAA-BBBB-CCCC-DDEE-FFGGHHIIJJKK}")];
249 OLECHAR iidwstr[sizeof(iidstr)];
250 StringFromGUID2(riid, iidwstr, ARRAYSIZE(iidwstr));
251 WideCharToMultiByte(CP_UTF8, 0, iidwstr, -1, iidstr, sizeof(iidstr), nullptr, nullptr);
252 MessageBoxA(nullptr, iidstr, typeid(*this).name(), MB_OK);
253 *ppvObject = nullptr;
254 return E_NOINTERFACE;
255}
256
257ULONG CoreWindowEra::AddRef()
258{
259 m_realWindow->AddRef();
260 return InterlockedIncrement(&m_RefCount);
261}

Callers

nothing calls this directly

Calls 1

AddRefFunction · 0.85

Tested by

no test coverage detected