MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / CreateInstance

Method CreateInstance

GTE_Win/ClassFactory.cpp:61–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59//
60
61IFACEMETHODIMP ClassFactory::CreateInstance(IUnknown* pUnkOuter, REFIID riid, void** ppv)
62{
63 HRESULT hr = CLASS_E_NOAGGREGATION;
64
65 // pUnkOuter is used for aggregation. We do not support it in the sample.
66 if (pUnkOuter == nullptr) {
67 hr = E_OUTOFMEMORY;
68
69 // Create the COM component.
70 GerberThumbnailProvider* pExt = new (std::nothrow) GerberThumbnailProvider();
71 if (pExt) {
72 // Query the specified interface.
73 hr = pExt->QueryInterface(riid, ppv);
74 pExt->Release();
75 }
76 }
77
78 return hr;
79}
80
81IFACEMETHODIMP ClassFactory::LockServer(BOOL fLock)
82{

Callers

nothing calls this directly

Calls 2

QueryInterfaceMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected