VirtualBox

Changeset 106582 in vbox


Ignore:
Timestamp:
Oct 22, 2024 10:00:15 PM (4 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165420
Message:

Add/Nt/Graphics: Windows 10 WDK 26100 build fixes (we're getting into harmless trouble with psapi.h because we're mixing this with the W7/WLH DDK). jiraref:VBP-1171

Location:
trunk
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/win/psapi.h

    r106578 r106582  
    11/** @file
    2  * Safe way to include winsock2.h.
     2 * Safe way to include psapi.h.
    33 */
    44
     
    3434 */
    3535
    36 #ifndef IPRT_INCLUDED_win_winsock2_h
    37 #define IPRT_INCLUDED_win_winsock2_h
     36#ifndef IPRT_INCLUDED_win_psapi_h
     37#define IPRT_INCLUDED_win_psapi_h
    3838#ifndef RT_WITHOUT_PRAGMA_ONCE
    3939# pragma once
    4040#endif
    4141
    42 /* winsock2.h includes windows.h, but without winsock.h, so we need to do it
    43    up front using our wrapper header to avoid repeating tricks here. */
    44 #define _WINSOCKAPI_ /* do not include winsock.h via windows.h */
    45 #include <iprt/win/windows.h>
     42/*
     43 * There is actually no problems with psapi.h, but we create a problem mixing
     44 * the Windows 7 WDK and a much more recent SDK, taking the psapi.h from the
     45 * latter and sdkddkver.h from the former.  The result is that the much newer
     46 * psapi.h file expects NTDDI_WIN10_CU to be defined, so we have to assit it
     47 * here to avoid this type of errors:
     48 * 
     49 * psapi.h(499): warning C4668: 'NTDDI_WIN10_CU' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
     50 */
     51#include <sdkddkver.h>
    4652
    47 #ifdef _MSC_VER
    48 /*
    49  * Unfortunately, the Windows.h file in SDK 7.1 is not clean wrt warning C4668:
    50  *      wincrypt.h(1848) : warning C4668: 'NTDDI_WINLH' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
    51  */
    52 # pragma warning(push)
    53 # pragma warning(disable:4668)
    54 # ifndef __cplusplus
    55 #  pragma warning(disable:4255) /* warning C4255: 'FARPROC' : no function prototype given: converting '()' to '(void)' */
    56 # endif
    57 # if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
    58 #  pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
    59 # endif
    60 # if _MSC_VER >= 1900 /*RT_MSC_VER_VC140*/
    61 #  ifdef __cplusplus
    62 #   pragma warning(disable:5039) /* winbase.h(13179): warning C5039: 'TpSetCallbackCleanupGroup': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception. */
    63 #  endif
    64 # endif
     53#ifndef NTDDI_WIN10_CU
     54# define NTDDI_WIN10_CU     0x0a00000d
    6555#endif
    6656
    67 #include <winsock2.h>
     57#include <psapi.h>
    6858
    69 #ifdef _MSC_VER
    70 # pragma warning(pop)
    71 #endif
     59#endif /* !IPRT_INCLUDED_win_psapi_h */
    7260
    73 #endif /* !IPRT_INCLUDED_win_winsock2_h */
    74 
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp

    r106061 r106582  
    3939#include "VBoxDispDbg.h"
    4040
    41 #include <Psapi.h>
     41#include <iprt/win/psapi.h>
    4242
    4343#define VBOXDISP_IS_MODULE_FUNC(_pvModule, _cbModule, _pfn) ( \
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispDbg.cpp

    r106061 r106582  
    2929
    3030#ifdef VBOXWDDMDISP_DEBUG_VEHANDLER
    31 # include <Psapi.h>
     31# include <iprt/win/psapi.h>
    3232#endif
    3333
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDX.cpp

    r106506 r106582  
    521521        case DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE:
    522522        case DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE:
     523#ifdef NTDDI_WIN11_GE
     524        case DXGI_FORMAT_A4B4G4R4_UNORM: /* Added in SDK w11/26100 or thereabouts. */
     525#endif
    523526        case DXGI_FORMAT_FORCE_UINT: /* warning */
    524527            break;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXDDI.cpp

    r106085 r106582  
    3737
    3838#include <d3d10umddi.h>
    39 #include <Psapi.h>
     39#include <iprt/win/psapi.h>
    4040
    4141#include "VBoxDX.h"
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette