Changeset 45317 in vbox for trunk/src/VBox/Installer/win/Stub
- Timestamp:
- Apr 3, 2013 5:46:20 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp
r44529 r45317 5 5 6 6 /* 7 * Copyright (C) 2010-201 2Oracle Corporation7 * Copyright (C) 2010-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 348 348 /* Do not use a global namespace ("Global\\") for mutex name here, will blow up NT4 compatibility! */ 349 349 HANDLE hMutexAppRunning = CreateMutex(NULL, FALSE, "VBoxStubInstaller"); 350 if ( (hMutexAppRunning != NULL)351 && (GetLastError() == ERROR_ALREADY_EXISTS))350 if ( hMutexAppRunning != NULL 351 && GetLastError() == ERROR_ALREADY_EXISTS) 352 352 { 353 353 /* Close the mutex for this application instance. */ 354 354 CloseHandle(hMutexAppRunning); 355 355 hMutexAppRunning = NULL; 356 return 1;356 return RTEXITCODE_FAILURE; 357 357 } 358 358 … … 360 360 int vrc = RTR3InitExe(argc, &argv, 0); 361 361 if (RT_FAILURE(vrc)) 362 return vrc;362 return RTMsgInitFailure(vrc); 363 363 364 364 /* … … 494 494 } 495 495 496 /** @todo The rest of this function should be done in smaller functions, 497 * we've lost the overview here! Too much state going around! */ 498 496 499 HRESULT hr = S_OK; 497 500 498 501 do /* break loop */ 499 502 { 500 /* Get/create our temp path (only if not already set). */ 503 /* 504 * Determine and create our temp path (only if not already set). 505 */ 501 506 if (szExtractPath[0] == '\0') 502 507 { … … 684 689 if (hModule) 685 690 FreeLibrary(hModule); 691 /** @todo program exit code needs to be set */ 686 692 break; 687 693 } … … 690 696 vrc = VERR_NO_CHANGE; /* No change done to the system. */ 691 697 } 698 else 699 /** @todo program exit code needs to be for ERROR_INSTALL_USEREXIT. */ 692 700 } 693 701 RTStrFree(pszTempFile); … … 700 708 && RT_SUCCESS(vrc)) 701 709 { 702 for (int i =0; i<5; i++)710 for (int i = 0; i < 5; i++) 703 711 { 704 712 vrc = RTDirRemoveRecursive(szExtractPath, 0 /*fFlags*/); … … 729 737 } 730 738 731 /* Set final exit (return) code (error level). */ 739 /* 740 * Figure the exit code (not very difficult at the moment). 741 */ 742 RTEXITCODE rcExit = RTEXITCODE_SUCCESS; 732 743 if (RT_FAILURE(vrc)) 733 { 734 switch(vrc) 735 { 736 case VERR_NO_CHANGE: 737 default: 738 vrc = 1; 739 } 740 } 741 else /* Always set to (VINF_SUCCESS), even if we got something else (like a VWRN etc). */ 742 vrc = VINF_SUCCESS; 743 return vrc; 744 } 745 744 rcExit = RTEXITCODE_FAILURE; 745 return rcExit; 746 } 747
Note:
See TracChangeset
for help on using the changeset viewer.