Changeset 59561 in vbox
- Timestamp:
- Feb 2, 2016 6:11:18 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/win/VBoxProxyStub.c
r59422 r59561 86 86 ((PKUSER_SHARED_DATA)MM_SHARED_USER_DATA_VA)->NtMajorVersion) >= RT_MAKE_U64(1/*Lo*/,6/*Hi*/) \ 87 87 ? "VBoxProxyStub.dll" : "VBoxProxyStubLegacy.dll" ) 88 89 /** For use with AssertLogRel except a_Expr1 from assertions but not LogRel. */ 90 #ifdef RT_STRICT 91 # define VBPS_LOGREL_NO_ASSERT(a_Expr1) (a_Expr) 92 #else 93 # define VBPS_LOGREL_NO_ASSERT false 94 #endif 88 95 89 96 … … 225 232 * /target being set to NT51. 226 233 */ 227 Assert Msg(hrc == S_OK, ("%Rhrc\n", hrc));234 AssertLogRelMsg(hrc == S_OK, ("%Rhrc\n", hrc)); 228 235 return hrc; 229 236 } … … 413 420 /* Ignore access denied errors as these may easily happen for 414 421 non-admin users. Just give up when this happens */ 415 Assert MsgReturn(rc == ERROR_ACCESS_DENIED, ("%u\n", rc), pState->rc = rc);422 AssertLogRelMsgReturn(rc == ERROR_ACCESS_DENIED, ("%u\n", rc), pState->rc = rc); 416 423 } 417 424 else 418 AssertMsgReturn(rc == ERROR_ACCESS_DENIED, ("%u\n", rc), pState->rc = rc);425 AssertLogRelMsgReturn(rc == ERROR_ACCESS_DENIED, ("%u\n", rc), pState->rc = rc); 419 426 return pState->rc = rc; 420 427 } … … 513 520 return ERROR_SUCCESS; 514 521 } 515 Assert MsgFailed(("%u\n", rc));522 AssertLogRelMsgFailed(("%u\n", rc)); 516 523 RegCloseKey(pState->aAltDeletes[i].hkeyClasses); 517 524 } … … 521 528 else 522 529 { 523 Assert MsgFailed(("%u\n", rc));530 AssertLogRelMsgFailed(("%u (%#x %s)\n", rc)); 524 531 pState->rc = rc; 525 532 } … … 556 563 rc = RegOpenKeyExW(pState->hkeyClassesRootDst, L"Interface", 0 /*fOptions*/, pState->fSamBoth, 557 564 &pState->hkeyClsidRootDst); 558 Assert MsgReturnStmt(rc == ERROR_SUCCESS, ("%u\n", rc), pState->hkeyInterfaceRootDst = NULL, pState->rc = rc);565 AssertLogRelMsgReturnStmt(rc == ERROR_SUCCESS, ("%u\n", rc), pState->hkeyInterfaceRootDst = NULL, pState->rc = rc); 559 566 } 560 567 … … 570 577 if (rc != ERROR_SUCCESS) 571 578 { 572 AssertMsgStmt(rc == ERROR_FILE_NOT_FOUND , ("%u\n", rc), pState->rc = rc);579 AssertMsgStmt(rc == ERROR_FILE_NOT_FOUND || ERROR_ACCESS_DENIED, ("%u\n", rc), pState->rc = rc); 573 580 pState->aAltDeletes[i].hkeyInterface = NULL; 574 581 } … … 702 709 } 703 710 704 AssertMsgFailed(("%d: '%ls'='%ls' -> %u\n", uLine, pwszValueNm, pwszValue, rc)); 711 AssertLogRelMsg(VBPS_LOGREL_NO_ASSERT(rc == ERROR_ACCESS_DENIED), 712 ("%d: '%ls'='%ls' -> %u\n", uLine, pwszValueNm, pwszValue, rc)); 705 713 pState->rc = rc; 706 714 return rc; … … 768 776 } 769 777 770 AssertMsgFailed(("%d: '%s'='%s' -> %u\n", uLine, pszValueNm, pszValue, rc)); 778 AssertLogRelMsg(VBPS_LOGREL_NO_ASSERT(rc == ERROR_ACCESS_DENIED), 779 ("%d: '%s'='%s' -> %u\n", uLine, pszValueNm, pszValue, rc)); 771 780 pState->rc = rc; 772 781 return rc; … … 788 797 return ERROR_SUCCESS; 789 798 790 Assert MsgFailed(("%d: close key -> %u\n", uLine, rc));799 AssertLogRelMsgFailed(("%d: close key -> %u\n", uLine, rc)); 791 800 pState->rc = rc; 792 801 return rc; … … 822 831 else 823 832 { 824 AssertMsgFailed(("%d: create key '%s' -> %u\n", uLine, pszKey, rc)); 833 AssertLogRelMsg(VBPS_LOGREL_NO_ASSERT(rc == ERROR_ACCESS_DENIED), 834 ("%d: create key '%s' -> %u\n", uLine, pszKey, rc)); 825 835 pState->rc = rc; 826 836 *phkey = NULL; … … 853 863 else 854 864 { 855 AssertMsgFailed(("%d: create key '%s'(/Default='%s') -> %u\n", uLine, pszKey, pszValue, rc)); 865 AssertLogRelMsg(VBPS_LOGREL_NO_ASSERT(rc == ERROR_ACCESS_DENIED), 866 ("%d: create key '%s'(/Default='%s') -> %u\n", uLine, pszKey, pszValue, rc)); 856 867 pState->rc = rc; 857 868 } … … 883 894 else 884 895 { 885 AssertMsgFailed(("%d: create key '%s'(/Default='%ls') -> %u\n", uLine, pszKey, pwszValue, rc)); 896 AssertLogRelMsg(VBPS_LOGREL_NO_ASSERT(rc == ERROR_ACCESS_DENIED), 897 ("%d: create key '%s'(/Default='%ls') -> %u\n", uLine, pszKey, pwszValue, rc)); 886 898 pState->rc = rc; 887 899 } … … 914 926 else 915 927 { 916 AssertMsgFailed(("%d: create key '%s'(/Default='%s') -> %u\n", uLine, pszKey, pszValue, rc)); 928 AssertLogRelMsg(VBPS_LOGREL_NO_ASSERT(rc == ERROR_ACCESS_DENIED), 929 ("%d: create key '%s'(/Default='%s') -> %u\n", uLine, pszKey, pszValue, rc)); 917 930 pState->rc = rc; 918 931 *phkey = NULL; … … 955 968 return ERROR_SUCCESS; 956 969 957 AssertMsgFailed(("%d: delete key '%s' -> %u\n", uLine, pszKey, rc)); 970 AssertLogRelMsg(VBPS_LOGREL_NO_ASSERT(rc == ERROR_ACCESS_DENIED), 971 ("%d: delete key '%s' -> %u\n", uLine, pszKey, rc)); 958 972 pState->rc = rc; 959 973 return rc; … … 994 1008 return ERROR_SUCCESS; 995 1009 996 AssertMsgFailed(("%d: delete key '%ls' -> %u\n", uLine, pwszKey, rc)); 1010 AssertLogRelMsg(VBPS_LOGREL_NO_ASSERT(rc == ERROR_ACCESS_DENIED), 1011 ("%d: delete key '%ls' -> %u\n", uLine, pwszKey, rc)); 997 1012 pState->rc = rc; 998 1013 return rc; … … 1023 1038 { 1024 1039 rc = RegOpenKeyExW(pState->aAltDeletes[i].hkeyClasses, L"AppID", 0 /*fOptions*/, pState->fSamDelete, &hkeyAppIds); 1025 Assert MsgStmt(rc == ERROR_SUCCESS || rc == ERROR_FILE_NOT_FOUND, ("%u\n", rc), pState->rc = rc);1040 AssertLogRelMsgStmt(rc == ERROR_SUCCESS || rc == ERROR_FILE_NOT_FOUND, ("%u\n", rc), pState->rc = rc); 1026 1041 if (rc == ERROR_SUCCESS) 1027 1042 { … … 1042 1057 return ERROR_SUCCESS; 1043 1058 } 1044 Assert MsgReturn(rc == ERROR_SUCCESS, ("%u\n", rc), pState->rc = rc);1059 AssertLogRelMsgReturn(rc == ERROR_SUCCESS, ("%u\n", rc), pState->rc = rc); 1045 1060 1046 1061 if (pState->fDelete) … … 1315 1330 /* Open Classes/TypeLib/. */ 1316 1331 rc = vbpsCreateRegKeyA(pState, pState->hkeyClassesRootDst, "TypeLib", &hkeyTypeLibs, __LINE__); 1317 AssertReturnVoid(rc == ERROR_SUCCESS); 1332 if (rc != ERROR_SUCCESS) 1333 return; 1318 1334 1319 1335 /* Create TypeLib/{UUID}. */ … … 1421 1437 Assert(pState->fUpdate && !pState->fDelete); 1422 1438 rc = vbpsRegOpenInterfaceKeys(pState); 1423 AssertReturnVoid(rc == ERROR_SUCCESS); 1439 if (rc != ERROR_SUCCESS) 1440 return rc; 1424 1441 1425 1442 /* … … 1450 1467 AssertReturnVoidStmt(cMethods >= 3 && cMethods < 1024, pState->rc = ERROR_INVALID_DATA); 1451 1468 sprintf(szMethods, "%u", cMethods); 1452 1453 AssertReturnVoid(rc == ERROR_SUCCESS);1454 1469 1455 1470 rc = vbpsCreateRegKeyWithDefaultValueAAEx(pState, pState->hkeyInterfaceRootDst,
Note:
See TracChangeset
for help on using the changeset viewer.