Changeset 95255 in vbox for trunk/src/VBox/Frontends/VBoxAutostart
- Timestamp:
- Jun 13, 2022 9:55:08 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxAutostart
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart.h
r95139 r95255 357 357 DECLHIDDEN(RTEXITCODE) autostartSvcDisplayGetOptError(const char *pszAction, int rc, PCRTGETOPTUNION pValue); 358 358 359 /** 360 * Starts the autostart environment by initializing all needed (global) objects. 361 * 362 * @returns VBox status code. 363 * 364 * @note This currently does NOT support multiple instances, be aware of this! 365 */ 359 366 DECLHIDDEN(int) autostartSetup(void); 360 367 368 /** 369 * Stops the autostart environment. 370 * 371 * @note This currently does NOT support multiple instances, be aware of this! 372 */ 361 373 DECLHIDDEN(void) autostartShutdown(void); 362 374 -
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostartUtils.cpp
r95139 r95255 263 263 } 264 264 265 DECLHIDDEN(int) autostartSetup( )265 DECLHIDDEN(int) autostartSetup(void) 266 266 { 267 267 autostartSvcOsLogStr("Setting up ...\n", AUTOSTARTLOGTYPE_VERBOSE); … … 277 277 char szHome[RTPATH_MAX] = ""; 278 278 com::GetVBoxUserHomeDirectory(szHome, sizeof(szHome)); 279 return RTMsgErrorExit(RTEXITCODE_FAILURE,280 "Failed to initialize COM because the global settings directory '%s' is not accessible!", szHome);279 autostartSvcLogError("Failed to initialize COM because the global settings directory '%s' is not accessible!", szHome); 280 return VERR_COM_FILE_ERROR; 281 281 } 282 282 # endif 283 283 if (FAILED(hrc)) 284 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to initialize COM (%Rhrc)!", hrc); 284 { 285 autostartSvcLogError("Failed to initialize COM (%Rhrc)!", hrc); 286 return VERR_COM_UNEXPECTED; 287 } 285 288 286 289 hrc = g_pVirtualBoxClient.createInprocObject(CLSID_VirtualBoxClient); … … 292 295 { 293 296 com::GluePrintRCMessage(hrc); 294 RTMsgError("Most likely, the VirtualBox COM server is not running or failed to start.");297 autostartSvcLogError("Most likely, the VirtualBox COM server is not running or failed to start."); 295 298 } 296 299 else 297 300 com::GluePrintErrorInfo(info); 298 return RTEXITCODE_FAILURE;301 return VERR_COM_UNEXPECTED; 299 302 } 300 303 … … 302 305 * Setup VirtualBox + session interfaces. 303 306 */ 304 HRESULTrc = g_pVirtualBoxClient->COMGETTER(VirtualBox)(g_pVirtualBox.asOutParam());305 if (SUCCEEDED( rc))306 { 307 rc = g_pSession.createInprocObject(CLSID_Session);308 if (FAILED( rc))309 RTMsgError("Failed to create a session object (rc=%Rhrc)!",rc);307 hrc = g_pVirtualBoxClient->COMGETTER(VirtualBox)(g_pVirtualBox.asOutParam()); 308 if (SUCCEEDED(hrc)) 309 { 310 hrc = g_pSession.createInprocObject(CLSID_Session); 311 if (FAILED(hrc)) 312 autostartSvcLogError("Failed to create a session object (rc=%Rhrc)!", hrc); 310 313 } 311 314 else 312 RTMsgError("Failed to get VirtualBox object (rc=%Rhrc)!",rc);313 314 if (FAILED( rc))315 autostartSvcLogError("Failed to get VirtualBox object (rc=%Rhrc)!", hrc); 316 317 if (FAILED(hrc)) 315 318 return VERR_COM_OBJECT_NOT_FOUND; 316 319 … … 318 321 } 319 322 320 DECLHIDDEN(void) autostartShutdown( )323 DECLHIDDEN(void) autostartShutdown(void) 321 324 { 322 325 autostartSvcOsLogStr("Shutting down ...\n", AUTOSTARTLOGTYPE_VERBOSE);
Note:
See TracChangeset
for help on using the changeset viewer.