VirtualBox

Changeset 95850 in vbox


Ignore:
Timestamp:
Jul 26, 2022 11:37:17 PM (2 years ago)
Author:
vboxsync
Message:

VBoxService/VMInfo-win.cpp: Use MAX_PATH from windows.h instead of _MAX_PATH from the CRT, d'oh. bugref:10261

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo-win.cpp

    r93115 r95850  
    6161typedef struct VBOXSERVICEVMINFOUSER
    6262{
    63     WCHAR wszUser[_MAX_PATH];
    64     WCHAR wszAuthenticationPackage[_MAX_PATH];
    65     WCHAR wszLogonDomain[_MAX_PATH];
     63    WCHAR wszUser[MAX_PATH];
     64    WCHAR wszAuthenticationPackage[MAX_PATH];
     65    WCHAR wszLogonDomain[MAX_PATH];
    6666    /** Number of assigned user processes. */
    6767    ULONG ulNumProcs;
     
    826826                               &pSessionData->LogonDomain, "Logon domain name");
    827827
    828         TCHAR           szOwnerName[_MAX_PATH]  = { 0 };
     828        TCHAR           szOwnerName[MAX_PATH]   = { 0 };
    829829        DWORD           dwOwnerNameSize         = sizeof(szOwnerName);
    830         TCHAR           szDomainName[_MAX_PATH] = { 0 };
     830        TCHAR           szDomainName[MAX_PATH] = { 0 };
    831831        DWORD           dwDomainNameSize        = sizeof(szDomainName);
    832832        SID_NAME_USE    enmOwnerType            = SidTypeInvalid;
     
    11881188                        AssertPtr(pCurUser);
    11891189
    1190                         if (   !wcscmp(userSession.wszUser, pCurUser->wszUser)
    1191                             && !wcscmp(userSession.wszLogonDomain, pCurUser->wszLogonDomain)
    1192                             && !wcscmp(userSession.wszAuthenticationPackage, pCurUser->wszAuthenticationPackage))
     1190                        if (   !RTUtf16Cmp(userSession.wszUser, pCurUser->wszUser)
     1191                            && !RTUtf16Cmp(userSession.wszLogonDomain, pCurUser->wszLogonDomain)
     1192                            && !RTUtf16Cmp(userSession.wszAuthenticationPackage, pCurUser->wszAuthenticationPackage))
    11931193                        {
    11941194                            /*
     
    13191319{
    13201320    int rc;
    1321     char szSysDir[_MAX_PATH] = {0};
    1322     char szWinDir[_MAX_PATH] = {0};
    1323     char szDriversDir[_MAX_PATH + 32] = {0};
     1321    char szSysDir[MAX_PATH] = {0};
     1322    char szWinDir[MAX_PATH] = {0};
     1323    char szDriversDir[MAX_PATH + 32] = {0};
    13241324
    13251325    /* ASSUME: szSysDir and szWinDir and derivatives are always ASCII compatible. */
    1326     GetSystemDirectory(szSysDir, _MAX_PATH);
    1327     GetWindowsDirectory(szWinDir, _MAX_PATH);
     1326    GetSystemDirectory(szSysDir, MAX_PATH);
     1327    GetWindowsDirectory(szWinDir, MAX_PATH);
    13281328    RTStrPrintf(szDriversDir, sizeof(szDriversDir), "%s\\drivers", szSysDir);
    13291329#ifdef RT_ARCH_AMD64
    1330     char szSysWowDir[_MAX_PATH + 32] = {0};
     1330    char szSysWowDir[MAX_PATH + 32] = {0};
    13311331    RTStrPrintf(szSysWowDir, sizeof(szSysWowDir), "%s\\SysWow64", szWinDir);
    13321332#endif
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