VirtualBox

Changeset 99828 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
May 17, 2023 1:48:57 PM (23 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
157464
Message:

*: A bunch of adjustments that allows using /permissive- with Visual C++ (qt 6.x necessity).

Location:
trunk/src/VBox/Additions/WINNT
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispDrawCmd.cpp

    r98103 r99828  
    158158}
    159159
    160 void VBoxDispDumpPSO(SURFOBJ *pso, char *s)
     160void VBoxDispDumpPSO(SURFOBJ *pso, const char *s)
    161161{
    162162    RT_NOREF(pso, s);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispInternal.h

    r98103 r99828  
    163163
    164164BOOL VBoxDispIsScreenSurface(SURFOBJ *pso);
    165 void VBoxDispDumpPSO(SURFOBJ *pso, char *s);
     165void VBoxDispDumpPSO(SURFOBJ *pso, const char *s);
    166166
    167167BOOL vrdpDrvRealizeBrush(BRUSHOBJ *pbo, SURFOBJ *psoTarget, SURFOBJ *psoPattern, SURFOBJ *psoMask,
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPCommon.h

    r98103 r99828  
    6161VP_STATUS VBoxMPCmnRegInit(IN PVBOXMP_DEVEXT pExt, OUT VBOXMPCMNREGISTRY *pReg);
    6262VP_STATUS VBoxMPCmnRegFini(IN VBOXMPCMNREGISTRY Reg);
    63 VP_STATUS VBoxMPCmnRegSetDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t Val);
    64 VP_STATUS VBoxMPCmnRegQueryDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t *pVal);
     63VP_STATUS VBoxMPCmnRegSetDword(IN VBOXMPCMNREGISTRY Reg, PCWSTR pName, uint32_t Val);
     64VP_STATUS VBoxMPCmnRegQueryDword(IN VBOXMPCMNREGISTRY Reg, PCWSTR pName, uint32_t *pVal);
    6565
    6666/* Pointer related */
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp

    r98103 r99828  
    405405}
    406406
    407 NTSTATUS vboxWddmRegOpenKeyEx(OUT PHANDLE phKey, IN HANDLE hRootKey, IN PWCHAR pName, IN ACCESS_MASK fAccess)
     407NTSTATUS vboxWddmRegOpenKeyEx(OUT PHANDLE phKey, IN HANDLE hRootKey, IN PCWCHAR pName, IN ACCESS_MASK fAccess)
    408408{
    409409    OBJECT_ATTRIBUTES ObjAttr;
     
    416416}
    417417
    418 NTSTATUS vboxWddmRegOpenKey(OUT PHANDLE phKey, IN PWCHAR pName, IN ACCESS_MASK fAccess)
     418NTSTATUS vboxWddmRegOpenKey(OUT PHANDLE phKey, IN PCWCHAR pName, IN ACCESS_MASK fAccess)
    419419{
    420420    return vboxWddmRegOpenKeyEx(phKey, NULL, pName, fAccess);
     
    562562}
    563563
    564 NTSTATUS vboxWddmRegQueryValueDword(IN HANDLE hKey, IN PWCHAR pName, OUT PDWORD pDword)
     564NTSTATUS vboxWddmRegQueryValueDword(IN HANDLE hKey, IN PCWCHAR pName, OUT PDWORD pDword)
    565565{
    566566    struct
     
    591591}
    592592
    593 NTSTATUS vboxWddmRegSetValueDword(IN HANDLE hKey, IN PWCHAR pName, IN DWORD val)
     593NTSTATUS vboxWddmRegSetValueDword(IN HANDLE hKey, IN PCWCHAR pName, IN DWORD val)
    594594{
    595595    UNICODE_STRING RtlStr;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.h

    r98103 r99828  
    9393NTSTATUS vboxWddmRegQueryDrvKeyName(PVBOXMP_DEVEXT pDevExt, ULONG cbBuf, PWCHAR pBuf, PULONG pcbResult);
    9494
    95 NTSTATUS vboxWddmRegOpenKeyEx(OUT PHANDLE phKey, IN HANDLE hRootKey, IN PWCHAR pName, IN ACCESS_MASK fAccess);
    96 NTSTATUS vboxWddmRegOpenKey(OUT PHANDLE phKey, IN PWCHAR pName, IN ACCESS_MASK fAccess);
    97 NTSTATUS vboxWddmRegQueryValueDword(IN HANDLE hKey, IN PWCHAR pName, OUT PDWORD pDword);
    98 NTSTATUS vboxWddmRegSetValueDword(IN HANDLE hKey, IN PWCHAR pName, IN DWORD val);
     95NTSTATUS vboxWddmRegOpenKeyEx(OUT PHANDLE phKey, IN HANDLE hRootKey, IN PCWCHAR pName, IN ACCESS_MASK fAccess);
     96NTSTATUS vboxWddmRegOpenKey(OUT PHANDLE phKey, IN PCWCHAR pName, IN ACCESS_MASK fAccess);
     97NTSTATUS vboxWddmRegQueryValueDword(IN HANDLE hKey, IN PCWCHAR pName, OUT PDWORD pDword);
     98NTSTATUS vboxWddmRegSetValueDword(IN HANDLE hKey, IN PCWCHAR pName, IN DWORD val);
    9999
    100100NTSTATUS vboxWddmRegDrvFlagsSet(PVBOXMP_DEVEXT pDevExt, DWORD fVal);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPRegistry.cpp

    r98103 r99828  
    5252{
    5353    if (!Reg)
    54     {
    5554        return ERROR_INVALID_PARAMETER;
    56     }
    5755
    5856    NTSTATUS Status = ZwClose(Reg);
     
    6058}
    6159
    62 VP_STATUS VBoxMPCmnRegQueryDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t *pVal)
     60VP_STATUS VBoxMPCmnRegQueryDword(IN VBOXMPCMNREGISTRY Reg, PCWSTR pName, uint32_t *pVal)
    6361{
    6462    /* seems like the new code assumes the Reg functions zeroes up the value on failure */
     
    6664
    6765    if (!Reg)
    68     {
    6966        return ERROR_INVALID_PARAMETER;
    70     }
    7167
    7268    NTSTATUS Status = vboxWddmRegQueryValueDword(Reg, pName, (PDWORD)pVal);
     
    7470}
    7571
    76 VP_STATUS VBoxMPCmnRegSetDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t Val)
     72VP_STATUS VBoxMPCmnRegSetDword(IN VBOXMPCMNREGISTRY Reg, PCWSTR pName, uint32_t Val)
    7773{
    7874    if (!Reg)
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp

    r98103 r99828  
    108108
    109109    /* Write hw information to registry, so that it's visible in windows property dialog */
    110     rc = VideoPortSetRegistryParameters(pExt, L"HardwareInformation.ChipType",
     110    rc = VideoPortSetRegistryParameters(pExt, (PWSTR)L"HardwareInformation.ChipType",
    111111                                        g_wszVBoxChipType, sizeof(g_wszVBoxChipType));
    112112    VBOXMP_WARN_VPS(rc);
    113     rc = VideoPortSetRegistryParameters(pExt, L"HardwareInformation.DacType",
     113    rc = VideoPortSetRegistryParameters(pExt, (PWSTR)L"HardwareInformation.DacType",
    114114                                        g_wszVBoxDACType, sizeof(g_wszVBoxDACType));
    115115    VBOXMP_WARN_VPS(rc);
    116     rc = VideoPortSetRegistryParameters(pExt, L"HardwareInformation.MemorySize",
     116    rc = VideoPortSetRegistryParameters(pExt, (PWSTR)L"HardwareInformation.MemorySize",
    117117                                        &cbVRAM, sizeof(ULONG));
    118118    VBOXMP_WARN_VPS(rc);
    119     rc = VideoPortSetRegistryParameters(pExt, L"HardwareInformation.AdapterString",
     119    rc = VideoPortSetRegistryParameters(pExt, (PWSTR)L"HardwareInformation.AdapterString",
    120120                                        g_wszVBoxAdapterString, sizeof(g_wszVBoxAdapterString));
    121121    VBOXMP_WARN_VPS(rc);
    122     rc = VideoPortSetRegistryParameters(pExt, L"HardwareInformation.BiosString",
     122    rc = VideoPortSetRegistryParameters(pExt, (PWSTR)L"HardwareInformation.BiosString",
    123123                                        g_wszVBoxBiosString, sizeof(g_wszVBoxBiosString));
    124124    VBOXMP_WARN_VPS(rc);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPRegistry.cpp

    r98103 r99828  
    5858}
    5959
    60 VP_STATUS VBoxMPCmnRegSetDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t Val)
     60VP_STATUS VBoxMPCmnRegSetDword(IN VBOXMPCMNREGISTRY Reg, PCWSTR pName, uint32_t Val)
    6161{
    62     return VideoPortSetRegistryParameters(Reg, pName, &Val, sizeof(Val));
     62    return VideoPortSetRegistryParameters(Reg, (PWSTR)pName, &Val, sizeof(Val));
    6363}
    6464
    65 VP_STATUS VBoxMPCmnRegQueryDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t *pVal)
     65VP_STATUS VBoxMPCmnRegQueryDword(IN VBOXMPCMNREGISTRY Reg, PCWSTR pName, uint32_t *pVal)
    6666{
    67     VP_STATUS rc;
    68 
    69     rc = VideoPortGetRegistryParameters(Reg, pName, FALSE, VBoxMPQueryNamedValueCB, pVal);
    70     if (rc!=NO_ERROR && pVal)
    71     {
     67    VP_STATUS rc = VideoPortGetRegistryParameters(Reg, (PWSTR)pName, FALSE, VBoxMPQueryNamedValueCB, pVal);
     68    if (rc != NO_ERROR && pVal)
    7269        *pVal = 0;
    73     }
    7470    return rc;
    7571}
  • trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp

    r98639 r99828  
    100100typedef struct
    101101{
    102     PWSTR pApplicationId;
    103     PWSTR pDisplayName;
    104     PWSTR pProductName;
    105     PWSTR pMfgName;
     102    PCWSTR pApplicationId;
     103    PCWSTR pDisplayName;
     104    PCWSTR pProductName;
     105    PCWSTR pMfgName;
    106106} INSTALLERINFO, *PINSTALLERINFO;
    107107typedef const PINSTALLERINFO PCINSTALLERINFO;
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/path.cpp

    r98103 r99828  
    3737*   Defined Constants And Macros                                                                                                 *
    3838*********************************************************************************************************************************/
    39 static UNICODE_STRING g_UnicodeBackslash = { 2, 4, L"\\" };
     39static UNICODE_STRING g_UnicodeBackslash = { 2, 4, (PWSTR)L"\\" };
    4040
    4141
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsf.cpp

    r98103 r99828  
    11241124    NTSTATUS Status = STATUS_BAD_NETWORK_NAME;
    11251125
    1126     ULONG i;
    1127     PWCHAR pwc;
    1128     PWCHAR pwc1;
    1129 
    1130     static PWCHAR spwszPrefix = L"\\Device\\VBoxMiniRdr\\;";
     1126    static WCHAR const s_wszPrefix[] = L"\\Device\\VBoxMiniRdr\\;";
    11311127
    11321128    /* Unicode chars in the string. */
     
    11351131
    11361132    /* Check that the name starts with correct prefix. */
    1137     pwc1 = &spwszPrefix[0];
    1138     pwc = ConnectionName->Buffer;
     1133    PCWCHAR pwc1 = &s_wszPrefix[0];
     1134    PCWCHAR pwc  = ConnectionName->Buffer;
     1135    ULONG   i;
    11391136    for (i = 0; i < cConnectionName; i++, pwc1++, pwc++)
    11401137    {
  • trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredentialProvider.cpp

    r98103 r99828  
    6969{
    7070    /** The actual method name the subscription is for. */
    71     char *pszMethod;
     71    const char *pszMethod;
    7272    /** A friendly name for the subscription. */
    73     char *pszSubscriptionName;
     73    const char *pszSubscriptionName;
    7474    /** The actual subscription UUID.
    7575     *  Should not be changed. */
    76     char *pszSubscriptionUUID;
     76    const char *pszSubscriptionUUID;
    7777} g_aSENSEvents[] = {
    7878    { "Logon",             "VBoxCredProv SENS Logon",             "{561D0791-47C0-4BC3-87C0-CDC2621EA653}" },
     
    284284            break;
    285285
    286         hr = g_pIEventSystem->Store(PROGID_EventSubscription, (IUnknown*)pIEventSubscription);
     286        hr = g_pIEventSystem->Store((BSTR)PROGID_EventSubscription, (IUnknown*)pIEventSubscription);
    287287        if (FAILED(hr))
    288288            break;
     
    346346        AssertContinue(SUCCEEDED(hr)); /* keep going */
    347347        int  iErrorIdX;
    348         hr = g_pIEventSystem->Remove(PROGID_EventSubscription, bstrSubToRemove.raw(), &iErrorIdX);
     348        hr = g_pIEventSystem->Remove((BSTR)PROGID_EventSubscription, bstrSubToRemove.raw(), &iErrorIdX);
    349349        if (FAILED(hr))
    350350        {
  • trunk/src/VBox/Additions/WINNT/VBoxCredProv/VBoxCredentialProvider.h

    r98103 r99828  
    9191{
    9292    /** The user's profile image (tile). */
    93     { { VBOXCREDPROV_FIELDID_TILEIMAGE,      CPFT_TILE_IMAGE,    L"Tile Image",     {0}                            }, CPFS_DISPLAY_IN_BOTH,            CPFIS_NONE    },
    94     { { VBOXCREDPROV_FIELDID_USERNAME,       CPFT_LARGE_TEXT,    L"Username",       CPFG_LOGON_USERNAME            }, CPFS_DISPLAY_IN_BOTH,            CPFIS_NONE    },
    95     { { VBOXCREDPROV_FIELDID_PASSWORD,       CPFT_PASSWORD_TEXT, L"Password",       CPFG_LOGON_PASSWORD            }, CPFS_DISPLAY_IN_SELECTED_TILE,   CPFIS_FOCUSED },
    96     { { VBOXCREDPROV_FIELDID_DOMAINNAME,     CPFT_LARGE_TEXT,    L"",               {0}                            }, CPFS_DISPLAY_IN_SELECTED_TILE,   CPFIS_FOCUSED },
    97     { { VBOXCREDPROV_FIELDID_SUBMIT_BUTTON,  CPFT_SUBMIT_BUTTON, L"Submit",         {0}                            }, CPFS_DISPLAY_IN_SELECTED_TILE,   CPFIS_FOCUSED },
     93    { { VBOXCREDPROV_FIELDID_TILEIMAGE,      CPFT_TILE_IMAGE,    (LPWSTR)L"Tile Image",     {0}                            }, CPFS_DISPLAY_IN_BOTH,            CPFIS_NONE    },
     94    { { VBOXCREDPROV_FIELDID_USERNAME,       CPFT_LARGE_TEXT,    (LPWSTR)L"Username",       CPFG_LOGON_USERNAME            }, CPFS_DISPLAY_IN_BOTH,            CPFIS_NONE    },
     95    { { VBOXCREDPROV_FIELDID_PASSWORD,       CPFT_PASSWORD_TEXT, (LPWSTR)L"Password",       CPFG_LOGON_PASSWORD            }, CPFS_DISPLAY_IN_SELECTED_TILE,   CPFIS_FOCUSED },
     96    { { VBOXCREDPROV_FIELDID_DOMAINNAME,     CPFT_LARGE_TEXT,    (LPWSTR)L"",               {0}                            }, CPFS_DISPLAY_IN_SELECTED_TILE,   CPFIS_FOCUSED },
     97    { { VBOXCREDPROV_FIELDID_SUBMIT_BUTTON,  CPFT_SUBMIT_BUTTON, (LPWSTR)L"Submit",         {0}                            }, CPFS_DISPLAY_IN_SELECTED_TILE,   CPFIS_FOCUSED },
    9898    /** New since Windows 8: The image used to represent a credential provider on the logon page. */
    99     { { VBOXCREDPROV_FIELDID_PROVIDER_LOGO,  CPFT_TILE_IMAGE,    L"Provider Logo",  CPFG_CREDENTIAL_PROVIDER_LOGO  }, CPFS_HIDDEN /* Not used yet. */, CPFIS_NONE },
     99    { { VBOXCREDPROV_FIELDID_PROVIDER_LOGO,  CPFT_TILE_IMAGE,    (LPWSTR)L"Provider Logo",  CPFG_CREDENTIAL_PROVIDER_LOGO  }, CPFS_HIDDEN /* Not used yet. */, CPFIS_NONE },
    100100    /** New since Windows 8: The label associated with a credential provider on the logon page. */
    101     { { VBOXCREDPROV_FIELDID_PROVIDER_LABEL, CPFT_SMALL_TEXT,    L"Provider Label", CPFG_CREDENTIAL_PROVIDER_LABEL }, CPFS_HIDDEN /* Not used yet. */, CPFIS_NONE }
     101    { { VBOXCREDPROV_FIELDID_PROVIDER_LABEL, CPFT_SMALL_TEXT,    (LPWSTR)L"Provider Label", CPFG_CREDENTIAL_PROVIDER_LABEL }, CPFS_HIDDEN /* Not used yet. */, CPFIS_NONE }
    102102};
    103103
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp

    r98103 r99828  
    16431643    DWORD winEr;
    16441644    int iPath;
     1645    UINT fSetFlags = 0; /* /permissive- hack */
    16451646
    16461647    winEr = vboxDispIfWddmDcCreate(&DispCfg, QDC_ONLY_ACTIVE_PATHS);
     
    17441745#endif
    17451746
    1746     UINT fSetFlags = !fSetTopology ? (SDC_USE_SUPPLIED_DISPLAY_CONFIG) : (SDC_ALLOW_PATH_ORDER_CHANGES | SDC_TOPOLOGY_SUPPLIED);
     1747    fSetFlags = !fSetTopology ? (SDC_USE_SUPPLIED_DISPLAY_CONFIG) : (SDC_ALLOW_PATH_ORDER_CHANGES | SDC_TOPOLOGY_SUPPLIED);
    17471748    winEr = vboxDispIfWddmDcSet(&DispCfg, fSetFlags | SDC_VALIDATE);
    17481749    if (winEr != ERROR_SUCCESS)
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxLA.cpp

    r98103 r99828  
    158158
    159159
    160 static BOOL laGetRegistryDWORD(WCHAR *pwszRegKey, WCHAR *pwszName, DWORD *pdwValue)
     160static BOOL laGetRegistryDWORD(const WCHAR *pwszRegKey, const WCHAR *pwszName, DWORD *pdwValue)
    161161{
    162162    LONG lErr;
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.h

    r98103 r99828  
    8080 * The environment information for services.
    8181 */
    82 typedef struct _VBOXSERVICEENV
     82typedef struct VBOXSERVICEENV
    8383{
    8484    /** hInstance of VBoxTray. */
     
    9797 * A service descriptor.
    9898 */
    99 typedef struct _VBOXSERVICEDESC
     99typedef struct VBOXSERVICEDESC
    100100{
    101101    /** The service's name. RTTHREAD_NAME_LEN maximum characters. */
    102     char          *pszName;
     102    const char *pszName;
    103103    /** The service description. */
    104     char          *pszDesc;
     104    const char *pszDesc;
    105105
    106106    /** Callbacks. */
     
    145145 * The service initialization info and runtime variables.
    146146 */
    147 typedef struct _VBOXSERVICEINFO
     147typedef struct VBOXSERVICEINFO
    148148{
    149149    /** Pointer to the service descriptor. */
     
    166166} VBOXSERVICEINFO, *PVBOXSERVICEINFO;
    167167
    168 /* Globally unique (system wide) message registration. */
    169 typedef struct _VBOXGLOBALMESSAGE
     168/**
     169 * Globally unique (system wide) message registration.
     170 */
     171typedef struct VBOXGLOBALMESSAGE
    170172{
    171173    /** Message name. */
    172     char    *pszName;
     174    const char *pszName;
    173175    /** Function pointer for handling the message. */
    174     int      (* pfnHandler)          (WPARAM wParam, LPARAM lParam);
     176    int       (*pfnHandler)(WPARAM wParam, LPARAM lParam);
    175177
    176178    /* Variables. */
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxVRDP.cpp

    r98103 r99828  
    6565};
    6666
    67 typedef struct _VBOXVRDPEXPPARAM
     67typedef struct VBOXVRDPEXPPARAM
    6868{
    6969    const char *name;
     
    7777} VBOXVRDPEXPPARAM, *PVBOXVRDPEXPPARAM;
    7878
    79 typedef struct _VBOXVRDPCONTEXT
     79typedef struct VBOXVRDPCONTEXT
    8080{
    8181    const VBOXSERVICEENV *pEnv;
     
    9696static VBOXVRDPEXPPARAM s_aSPIParams[] =
    9797{
    98     { SPI_(MEDIUM, DESKWALLPAPER),           VBOX_SPI_STRING,   "" },
     98    { SPI_(MEDIUM, DESKWALLPAPER),           VBOX_SPI_STRING,   (void *)"" },
    9999    { SPI_(FULL,   DROPSHADOW),              VBOX_SPI_BOOL_PTR,       },
    100100    { SPI_(HIGH,   FONTSMOOTHING),           VBOX_SPI_BOOL,           },
Note: See TracChangeset for help on using the changeset viewer.

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