| 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 | |
| 257 | ULONG CoreWindowEra::AddRef() |
| 258 | { |
| 259 | m_realWindow->AddRef(); |
| 260 | return InterlockedIncrement(&m_RefCount); |
| 261 | } |