- Timestamp:
- May 15, 2020 8:26:13 PM (5 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r83842 r84325 3466 3466 vboxWddmDisplaySettingsCheckPos(pDevExt, i); 3467 3467 } 3468 Status = STATUS_SUCCESS; 3468 3469 break; 3469 3470 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp
r82968 r84325 33 33 * Defined Constants And Macros * 34 34 *********************************************************************************************************************************/ 35 #ifdef DEBUG _misha35 #ifdef DEBUG 36 36 # define WARN(_m) do { \ 37 Assert(0); \ 38 Log(_m); \ 39 } while (0) 40 # define WARN_FUNC(_m) do { \ 41 Assert(0); \ 42 LogFunc(_m); \ 37 AssertFailed(); \ 38 LogRelFunc(_m); \ 43 39 } while (0) 44 40 #else 45 41 # define WARN(_m) do { \ 46 Log(_m); \ 47 } while (0) 48 # define WARN_FUNC(_m) do { \ 49 LogFunc(_m); \ 42 LogRelFunc(_m); \ 50 43 } while (0) 51 44 #endif … … 585 578 } 586 579 587 return hr;580 return ERROR_NOT_SUPPORTED; 588 581 } 589 582 … … 693 686 else 694 687 { 695 WARN _FUNC(("GetModuleHandle(USER32) failed, err(%d)\n", GetLastError()));688 WARN(("GetModuleHandle(USER32) failed, err(%d)\n", GetLastError())); 696 689 err = ERROR_NOT_SUPPORTED; 697 690 } … … 699 692 else 700 693 { 701 WARN _FUNC(("can not switch to VBOXDISPIF_MODE_WDDM, because os is not Vista or upper\n"));694 WARN(("can not switch to VBOXDISPIF_MODE_WDDM, because os is not Vista or upper\n")); 702 695 err = ERROR_NOT_SUPPORTED; 703 696 } … … 782 775 else 783 776 { 784 WARN(("VBoxTray: pfnD3DKMTEscape failed Status 0x%x\n", Status));777 WARN(("VBoxTray: pfnD3DKMTEscape(0x%08X) failed Status 0x%x\n", pEscape->escapeCode, Status)); 785 778 winEr = ERROR_GEN_FAILURE; 786 779 } … … 1014 1007 if (!RegisterClassEx(&wc)) 1015 1008 { 1016 WARN _FUNC(("RegisterClass failed, winErr(%d)\n", GetLastError()));1009 WARN(("RegisterClass failed, winErr(%d)\n", GetLastError())); 1017 1010 hr = E_FAIL; 1018 1011 } … … 1037 1030 else 1038 1031 { 1039 WARN _FUNC(("CreateWindowEx failed, winErr(%d)\n", GetLastError()));1032 WARN(("CreateWindowEx failed, winErr(%d)\n", GetLastError())); 1040 1033 hr = E_FAIL; 1041 1034 } … … 1052 1045 1053 1046 DWORD winErr = GetLastError(); 1054 WARN _FUNC(("DestroyWindow failed, winErr(%d) for hWnd(0x%x)\n", winErr, hWnd));1047 WARN(("DestroyWindow failed, winErr(%d) for hWnd(0x%x)\n", winErr, hWnd)); 1055 1048 1056 1049 return HRESULT_FROM_WIN32(winErr); … … 1099 1092 { 1100 1093 DWORD winErr = GetLastError(); 1101 WARN _FUNC(("SetEvent failed, winErr = (%d)", winErr));1094 WARN(("SetEvent failed, winErr = (%d)", winErr)); 1102 1095 HRESULT hrTmp = HRESULT_FROM_WIN32(winErr); 1103 1096 Assert(hrTmp != S_OK); NOREF(hrTmp); … … 1204 1197 { 1205 1198 DWORD winErr = GetLastError(); 1206 WARN _FUNC(("CreateThread failed, winErr = (%d)", winErr));1199 WARN(("CreateThread failed, winErr = (%d)", winErr)); 1207 1200 hr = HRESULT_FROM_WIN32(winErr); 1208 1201 Assert(hr != S_OK); … … 1213 1206 { 1214 1207 DWORD winErr = GetLastError(); 1215 WARN _FUNC(("CreateEvent failed, winErr = (%d)", winErr));1208 WARN(("CreateEvent failed, winErr = (%d)", winErr)); 1216 1209 hr = HRESULT_FROM_WIN32(winErr); 1217 1210 Assert(hr != S_OK); … … 1708 1701 { 1709 1702 const VMMDevDisplayDef* pDispDef; 1703 uint32_t i; 1704 1710 1705 VBOXDISPIF_OP Op; 1711 DWORD winEr = ERROR_SUCCESS; 1712 uint32_t i; 1713 int iPath; 1714 1715 vboxDispIfOpBegin(pIf, &Op); 1706 DWORD winEr = vboxDispIfOpBegin(pIf, &Op); 1707 if (winEr != ERROR_SUCCESS) 1708 { 1709 WARN(("VBoxTray: vboxDispIfOpBegin failed winEr 0x%x", winEr)); 1710 return (winEr == ERROR_SUCCESS); 1711 } 1716 1712 1717 1713 for (i = 0; i < cDispDef; ++i) … … 1719 1715 pDispDef = &paDispDef[i]; 1720 1716 1721 if (!(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_DISABLED) && 1722 (pDispDef->fDisplayFlags | VMMDEV_DISPLAY_CX) || 1723 (pDispDef->fDisplayFlags | VMMDEV_DISPLAY_CY)) 1717 if (RT_BOOL(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_DISABLED)) 1718 continue; 1719 1720 if ( RT_BOOL(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_CX) 1721 && RT_BOOL(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_CY)) 1724 1722 { 1725 1723 RTRECTSIZE Size; 1726 1727 1724 Size.cx = pDispDef->cx; 1728 1725 Size.cy = pDispDef->cy; … … 1735 1732 1736 1733 VBOXDISPIF_WDDM_DISPCFG DispCfg; 1737 1738 vboxDispIfWddmDcCreate(&DispCfg, QDC_ALL_PATHS); 1734 winEr = vboxDispIfWddmDcCreate(&DispCfg, QDC_ALL_PATHS); 1735 if (winEr != ERROR_SUCCESS) 1736 { 1737 WARN(("VBoxTray: vboxDispIfWddmDcCreate failed winEr 0x%x", winEr)); 1738 return (winEr == ERROR_SUCCESS); 1739 } 1739 1740 1740 1741 for (i = 0; i < cDispDef; ++i) 1741 1742 { 1743 pDispDef = &paDispDef[i]; 1744 1742 1745 DISPLAYCONFIG_PATH_INFO *pPathInfo; 1743 1744 pDispDef = &paDispDef[i]; 1745 iPath = vboxDispIfWddmDcSearchPath(&DispCfg, pDispDef->idDisplay, pDispDef->idDisplay); 1746 1746 int iPath = vboxDispIfWddmDcSearchPath(&DispCfg, pDispDef->idDisplay, pDispDef->idDisplay); 1747 1747 if (iPath < 0) 1748 1748 { … … 1941 1941 1942 1942 vboxDispIfOpBegin(pIf, &Op); 1943 if (winEr != ERROR_SUCCESS) 1944 { 1945 WARN(("VBoxTray: vboxDispIfOpBegin failed winEr 0x%x", winEr)); 1946 return (winEr == ERROR_SUCCESS); 1947 } 1943 1948 1944 1949 for (id = 0; id < cDispDef; ++id) … … 1946 1951 pDispDef = &paDispDef[id]; 1947 1952 1948 if (!(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_DISABLED) && 1949 (pDispDef->fDisplayFlags | VMMDEV_DISPLAY_CX) || 1950 (pDispDef->fDisplayFlags | VMMDEV_DISPLAY_CY)) 1953 if (RT_BOOL(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_DISABLED)) 1954 continue; 1955 1956 if ( RT_BOOL(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_CX) 1957 && RT_BOOL(pDispDef->fDisplayFlags & VMMDEV_DISPLAY_CY)) 1951 1958 { 1952 1959 RTRECTSIZE Size; 1953 1954 1960 Size.cx = pDispDef->cx; 1955 1961 Size.cy = pDispDef->cy; … … 2322 2328 #endif 2323 2329 default: 2324 WARN _FUNC(("unknown mode (%d)\n", pIf->enmMode));2330 WARN(("unknown mode (%d)\n", pIf->enmMode)); 2325 2331 return ERROR_INVALID_PARAMETER; 2326 2332 } … … 2341 2347 #endif 2342 2348 default: 2343 WARN _FUNC(("unknown mode (%d)\n", pIf->enmMode));2349 WARN(("unknown mode (%d)\n", pIf->enmMode)); 2344 2350 return ERROR_INVALID_PARAMETER; 2345 2351 } … … 2519 2525 #endif 2520 2526 default: 2521 WARN _FUNC(("unknown mode (%d)\n", pIf->enmMode));2527 WARN(("unknown mode (%d)\n", pIf->enmMode)); 2522 2528 return ERROR_INVALID_PARAMETER; 2523 2529 } … … 2545 2551 if (!fSupported) 2546 2552 { 2547 WARN _FUNC(("pfnChangeDisplaySettingsEx function pointer failed to initialize\n"));2553 WARN(("pfnChangeDisplaySettingsEx function pointer failed to initialize\n")); 2548 2554 err = ERROR_NOT_SUPPORTED; 2549 2555 } … … 2551 2557 else 2552 2558 { 2553 WARN _FUNC(("failed to get USER32 handle, err (%d)\n", GetLastError()));2559 WARN(("failed to get USER32 handle, err (%d)\n", GetLastError())); 2554 2560 err = ERROR_NOT_SUPPORTED; 2555 2561 } … … 2557 2563 else 2558 2564 { 2559 WARN _FUNC(("can not switch to VBOXDISPIF_MODE_XPDM, because os is not >= w2k\n"));2565 WARN(("can not switch to VBOXDISPIF_MODE_XPDM, because os is not >= w2k\n")); 2560 2566 err = ERROR_NOT_SUPPORTED; 2561 2567 } … … 2595 2601 } 2596 2602 else 2597 WARN _FUNC(("failed to switch to XPDM_NT4 mode, err (%d)\n", err));2603 WARN(("failed to switch to XPDM_NT4 mode, err (%d)\n", err)); 2598 2604 break; 2599 2605 case VBOXDISPIF_MODE_XPDM: … … 2606 2612 } 2607 2613 else 2608 WARN _FUNC(("failed to switch to XPDM mode, err (%d)\n", err));2614 WARN(("failed to switch to XPDM mode, err (%d)\n", err)); 2609 2615 break; 2610 2616 #ifdef VBOX_WITH_WDDM … … 2619 2625 } 2620 2626 else 2621 WARN _FUNC(("failed to switch to WDDM mode, err (%d)\n", err));2627 WARN(("failed to switch to WDDM mode, err (%d)\n", err)); 2622 2628 break; 2623 2629 } … … 2632 2638 } 2633 2639 else 2634 WARN _FUNC(("failed to switch to WDDM mode, err (%d)\n", err));2640 WARN(("failed to switch to WDDM mode, err (%d)\n", err)); 2635 2641 break; 2636 2642 }
Note:
See TracChangeset
for help on using the changeset viewer.