HRESULT CreateAddressEditBox(REFIID riid, void **ppv)
{
- CComObject<CAddressEditBox> *theMenuBar;
- HRESULT hResult;
-
- if (ppv == NULL)
- return E_POINTER;
- *ppv = NULL;
- ATLTRY (theMenuBar = new CComObject<CAddressEditBox>);
- if (theMenuBar == NULL)
- return E_OUTOFMEMORY;
- hResult = theMenuBar->QueryInterface(riid, reinterpret_cast<void **>(ppv));
- if (FAILED_UNEXPECTEDLY(hResult))
- {
- delete theMenuBar;
- return hResult;
- }
- return S_OK;
+ return ShellObjectCreator<CAddressEditBox>(riid, ppv);
}