shell32: Fix initial reference count for a new IAutoComplete instance.

This commit is contained in:
Andrew Nguyen 2011-01-21 04:56:22 -06:00 committed by Alexandre Julliard
parent 57e4e608dc
commit 7a6c0d2f46
1 changed files with 9 additions and 15 deletions

View File

@ -121,33 +121,27 @@ static void create_listbox(IAutoCompleteImpl *This)
HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
{
IAutoCompleteImpl *lpac;
HRESULT hr;
if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown))
return CLASS_E_NOAGGREGATION;
return CLASS_E_NOAGGREGATION;
lpac = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAutoCompleteImpl));
if (!lpac)
return E_OUTOFMEMORY;
if (!lpac)
return E_OUTOFMEMORY;
lpac->ref = 1;
lpac->lpVtbl = &acvt;
lpac->lpDropDownVtbl = &acdropdownvt;
lpac->enabled = TRUE;
lpac->enumstr = NULL;
lpac->options = ACO_AUTOAPPEND;
lpac->wpOrigEditProc = NULL;
lpac->hwndListBox = NULL;
lpac->txtbackup = NULL;
lpac->quickComplete = NULL;
if (FAILED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) {
IUnknown_Release (_IUnknown_ (lpac));
return E_NOINTERFACE;
}
hr = IUnknown_QueryInterface(_IUnknown_ (lpac), riid, ppv);
IUnknown_Release(_IUnknown_ (lpac));
TRACE("-- (%p)->\n",lpac);
return S_OK;
return hr;
}
/**************************************************************************