diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-04 19:36:14 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-04 19:36:14 +0000 |
commit | e6190aa61e547643a53e7a27a158d221c6f3c48d (patch) | |
tree | 7524db478049829f1506cdce10804163aac92f7d /chrome_frame/chrome_tab.cc | |
parent | b0d9bfae8b254a3c4bff72fbba934271e2191dde (diff) | |
download | chromium_src-e6190aa61e547643a53e7a27a158d221c6f3c48d.zip chromium_src-e6190aa61e547643a53e7a27a158d221c6f3c48d.tar.gz chromium_src-e6190aa61e547643a53e7a27a158d221c6f3c48d.tar.bz2 |
Invoke the OaEnablePerUserTLibRegistration function in oleaut32.dll during ChromeFrame
per user registration on Vista and beyond. This is to workaround a bug on Vista SP1 and up
where the mappings of per user type lib reg keys to HKCR don't work as expected.
Windows 7 does not have this bug. The function is a noop there.
BUG=none
TEST=Per user chrome frame tests should work with UAC off
Review URL: http://codereview.chromium.org/6286120
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_tab.cc')
-rw-r--r-- | chrome_frame/chrome_tab.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc index 91f3680..8606b3b 100644 --- a/chrome_frame/chrome_tab.cc +++ b/chrome_frame/chrome_tab.cc @@ -548,6 +548,19 @@ STDAPI CustomRegistration(UINT reg_flags, BOOL reg, bool is_system) { } if ((hr == S_OK) && (flags & TYPELIB)) { + if (reg && !is_system) { + // Enables the RegisterTypeLib Function function to override default + // registry mappings under Windows Vista Service Pack 1 (SP1), + // Windows Server 2008, and later operating system versions + typedef void (WINAPI* OaEnablePerUserTypeLibReg)(void); + OaEnablePerUserTypeLibReg per_user_typelib_func = + reinterpret_cast<OaEnablePerUserTypeLibReg>( + GetProcAddress(GetModuleHandle(L"oleaut32.dll"), + "OaEnablePerUserTLibRegistration")); + if (per_user_typelib_func) { + (*per_user_typelib_func)(); + } + } hr = (reg)? UtilRegisterTypeLib(_AtlComModule.m_hInstTypeLib, NULL, !is_system) : UtilUnRegisterTypeLib(_AtlComModule.m_hInstTypeLib, NULL, !is_system); |