Changeset 59368 in vbox
- Timestamp:
- Jan 17, 2016 5:48:01 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/VBox/com/com.h (modified) (1 diff)
-
src/VBox/Main/glue/initterm.cpp (modified) (2 diffs)
-
src/VBox/Main/src-server/win/svcmain.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/com.h
r58110 r59368 41 41 * willing to perform COM operations. 42 42 * 43 * @param fGui if call is performed on the GUI thread 43 * @param fGui if call is performed on the GUI thread 44 * @param fAutoRegUpdate if to do auto MS COM registration updates. 44 45 * @return COM result code 45 46 */ 46 HRESULT Initialize(bool fGui = false );47 HRESULT Initialize(bool fGui = false, bool fAutoRegUpdate = true); 47 48 48 49 /** -
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 /* -
trunk/src/VBox/Main/src-server/win/svcmain.cpp
r55980 r59368 339 339 340 340 int nRet = 0; 341 HRESULT hRes = com::Initialize( );341 HRESULT hRes = com::Initialize(false /*fGui*/, fRun /*fAutoRegUpdate*/); 342 342 343 343 _ASSERTE(SUCCEEDED(hRes));
Note:
See TracChangeset
for help on using the changeset viewer.

