| 7 | #include <new> |
| 8 | |
| 9 | STDMETHODIMP 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 | |
| 25 | CClassFactory::~CClassFactory(void) { |
| 26 | } |
nothing calls this directly
no test coverage detected