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