Commit b0e3c91c authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

dxdiagn: Fail class instantiation if aggregation is requested.

parent d36e3b4a
......@@ -140,11 +140,11 @@ HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, R
TRACE("(%p, %s, %p)\n", punkOuter, debugstr_guid(riid), ppobj);
provider = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagProviderImpl));
if (NULL == provider) {
*ppobj = NULL;
return E_OUTOFMEMORY;
}
if (punkOuter) return CLASS_E_NOAGGREGATION;
provider = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagProviderImpl));
if (NULL == provider) return E_OUTOFMEMORY;
provider->lpVtbl = &DxDiagProvider_Vtbl;
provider->ref = 0; /* will be inited with QueryInterface */
return IDxDiagProviderImpl_QueryInterface ((PDXDIAGPROVIDER)provider, riid, ppobj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment