MCPcopy Create free account
hub / github.com/LegacyUpdate/LegacyUpdate / SetBrowserHwnd

Method SetBrowserHwnd

LegacyUpdate/ElevationHelper.cpp:159–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159STDMETHODIMP CElevationHelper::SetBrowserHwnd(IUpdateInstaller *installer, LONG_PTR hwnd) {
160 if (installer == NULL) {
161 return E_INVALIDARG;
162 }
163
164 CComPtr<IUpdateInstaller> updateInstaller;
165 HRESULT hr = installer->QueryInterface(IID_IUpdateInstaller, (void **)&updateInstaller);
166 CHECK_HR_OR_RETURN(L"QueryInterface IID_IUpdateInstaller");
167
168 hr = updateInstaller->put_ParentHwnd((HWND)hwnd);
169 CHECK_HR_OR_RETURN(L"put_ParentHwnd");
170
171 return S_OK;
172}
173
174STDMETHODIMP CElevationHelper::Reboot(void) {
175 // Calling Commit() is recommended on Windows 10, to ensure feature updates are properly prepared prior to the reboot.

Callers

nothing calls this directly

Calls 1

QueryInterfaceMethod · 0.45

Tested by

no test coverage detected