Commit 54408896 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

shlwapi: Fix IUnknown_OnFocusOCS to call OnFocus instead of GetExtendedControl.

parent 5dadeeb2
......@@ -1775,29 +1775,29 @@ HRESULT WINAPI IUnknown_TranslateAcceleratorOCS(IUnknown *lpUnknown, LPMSG lpMsg
/*************************************************************************
* @ [SHLWAPI.189]
*
* Call IOleControlSite_GetExtendedControl() on an object.
* Call IOleControlSite_OnFocus() on an object.
*
* PARAMS
* lpUnknown [I] Object supporting the IOleControlSite interface.
* lppDisp [O] Destination for resulting IDispatch.
* fGotFocus [I] Whether focus was gained (TRUE) or lost (FALSE).
*
* RETURNS
* Success: S_OK.
* Failure: An HRESULT error code, or E_FAIL if lpUnknown is NULL.
*/
DWORD WINAPI IUnknown_OnFocusOCS(IUnknown *lpUnknown, IDispatch** lppDisp)
HRESULT WINAPI IUnknown_OnFocusOCS(IUnknown *lpUnknown, BOOL fGotFocus)
{
IOleControlSite* lpCSite = NULL;
HRESULT hRet = E_FAIL;
TRACE("(%p,%p)\n", lpUnknown, lppDisp);
TRACE("(%p,%s)\n", lpUnknown, fGotFocus ? "TRUE" : "FALSE");
if (lpUnknown)
{
hRet = IUnknown_QueryInterface(lpUnknown, &IID_IOleControlSite,
(void**)&lpCSite);
if (SUCCEEDED(hRet) && lpCSite)
{
hRet = IOleControlSite_GetExtendedControl(lpCSite, lppDisp);
hRet = IOleControlSite_OnFocus(lpCSite, fGotFocus);
IOleControlSite_Release(lpCSite);
}
}
......
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