MCPcopy Create free account
hub / github.com/LegacyUpdate/LegacyUpdate / Create

Method Create

LegacyUpdate/ElevationHelper.cpp:50–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50STDMETHODIMP CElevationHelper::Create(IUnknown *pUnkOuter, REFIID riid, void **ppv) {
51 if (pUnkOuter != NULL) {
52 return CLASS_E_NOAGGREGATION;
53 }
54
55 CElevationHelper *pThis = (CElevationHelper *)CoTaskMemAlloc(sizeof(CElevationHelper));
56 if (pThis == NULL) {
57 return E_OUTOFMEMORY;
58 }
59
60 new(pThis) CElevationHelper();
61 InterlockedIncrement(&g_serverLocks);
62 // TODO: Only do this if we're in dllhost
63 BecomeDPIAware();
64 HRESULT hr = pThis->QueryInterface(riid, ppv);
65 pThis->Release();
66 return hr;
67}
68
69CElevationHelper::~CElevationHelper(void) {
70}

Callers

nothing calls this directly

Calls 3

BecomeDPIAwareFunction · 0.85
QueryInterfaceMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected