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

Method Create

LegacyUpdate/ClassFactory.cpp:9–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <new>
8
9STDMETHODIMP CClassFactory::Create(IUnknown *pUnkOuter, REFIID riid, void **ppv) {
10 if (pUnkOuter != NULL) {
11 return CLASS_E_NOAGGREGATION;
12 }
13
14 CClassFactory *pThis = (CClassFactory *)CoTaskMemAlloc(sizeof(CClassFactory));
15 if (pThis == NULL) {
16 return E_OUTOFMEMORY;
17 }
18
19 new(pThis) CClassFactory();
20 HRESULT hr = pThis->QueryInterface(riid, ppv);
21 pThis->Release();
22 return hr;
23}
24
25CClassFactory::~CClassFactory(void) {
26}

Callers

nothing calls this directly

Calls 2

QueryInterfaceMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected