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

Method QueryInterface

projects/WinDurango.KernelX/src/EraNetworking.cpp:43–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43HRESULT NetworkInformationEra::QueryInterface(const IID &riid, void **ppvObject)
44{
45 if (riid == __uuidof(IActivationFactory) || riid == __uuidof(IUnknown))
46 {
47 *ppvObject = static_cast<IActivationFactory *>(this);
48 AddRef();
49 return S_OK;
50 }
51
52 if (riid == __uuidof(INetworkInformationEra) || riid == __uuidof(ABI::Windows::Networking::Connectivity::INetworkInformationStatics))
53 {
54 *ppvObject = static_cast<INetworkInformationEra*>(this);
55 AddRef();
56 return S_OK;
57 }
58
59 char iidstr[sizeof("{AAAAAAAA-BBBB-CCCC-DDEE-FFGGHHIIJJKK}")];
60 OLECHAR iidwstr[sizeof(iidstr)];
61 StringFromGUID2(riid, iidwstr, ARRAYSIZE(iidwstr));
62 WideCharToMultiByte(CP_UTF8, 0, iidwstr, -1, iidstr, sizeof(iidstr), nullptr, nullptr);
63 MessageBoxA(nullptr, iidstr, typeid(*this).name(), MB_OK);
64
65 *ppvObject = nullptr;
66 return E_NOINTERFACE;
67}
68
69ULONG NetworkInformationEra::AddRef()
70{

Callers

nothing calls this directly

Calls 1

AddRefFunction · 0.85

Tested by

no test coverage detected