Changeset 59368 in vbox for trunk/src/VBox/Main/glue
- Timestamp:
- Jan 17, 2016 5:48:01 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 105056
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/initterm.cpp
r55451 r59368 46 46 #include <iprt/asm.h> 47 47 #include <iprt/env.h> 48 #include <iprt/ldr.h> 48 49 #include <iprt/param.h> 49 50 #include <iprt/path.h> … … 237 238 * @return S_OK on success and a COM result code in case of failure. 238 239 */ 239 HRESULT Initialize(bool fGui )240 HRESULT Initialize(bool fGui /*= false*/, bool fAutoRegUpdate /*= true*/) 240 241 { 241 242 HRESULT rc = E_FAIL; 243 NOREF(fAutoRegUpdate); 242 244 243 245 #if !defined(VBOX_WITH_XPCOM) 246 247 # ifdef VBOX_WITH_AUTO_COM_REG_UPDATE 248 /* 249 * First time we're called in a process, we refresh the VBox COM registrations. 250 */ 251 if (fAutoRegUpdate && gCOMMainThread == NIL_RTTHREAD) 252 { 253 char szPath[RTPATH_MAX]; 254 int vrc = RTPathAppPrivateArch(szPath, sizeof(szPath)); 255 if (RT_SUCCESS(vrc)) 256 # ifndef VBOX_IN_32_ON_64_MAIN_API 257 rc = RTPathAppend(szPath, sizeof(szPath), "VBoxProxyStub.dll"); 258 # else 259 rc = RTPathAppend(szPath, sizeof(szPath), "x86\\VBoxProxyStub-x86.dll"); 260 # endif 261 if (RT_SUCCESS(vrc)) 262 { 263 RTLDRMOD hMod; 264 vrc = RTLdrLoad(szPath, &hMod); 265 if (RT_SUCCESS(vrc)) 266 { 267 union 268 { 269 void *pv; 270 DECLCALLBACKMEMBER(uint32_t, pfnRegUpdate)(void); 271 } u; 272 rc = RTLdrGetSymbol(hMod, "VbpsUpdateRegistrations", &u.pv); 273 if (RT_SUCCESS(rc)) 274 u.pfnRegUpdate(); 275 /* Just keep it loaded. */ 276 } 277 } 278 } 279 # endif 244 280 245 281 /*
Note:
See TracChangeset
for help on using the changeset viewer.