VirtualBox

Changeset 103230 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Feb 6, 2024 4:03:24 PM (12 months ago)
Author:
vboxsync
Message:

IPRT/process-win: Fixed regression from r152441, leading to start Windows processes from services in session 0 instead of session >=1.

This was due to reworking the code to solely use the "W-variants" (Unicode) of the Windows Process32 APIs. rtProcWinFindTokenByProcess() now uses PROCESSENTRY32W instead of PROCESSENTRY32, but it was forgotten to also change the dwSize member to sizeof(PROCESSENTRY32W). This in turn led to a debug assertion, showing a ERROR_BAD_LENGTH. The function itself, however, just returned false in release builds, which in turn messes up the process token handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/process-win.cpp

    r99828 r103230  
    731731            {
    732732                PROCESSENTRY32W ProcEntry;
    733                 ProcEntry.dwSize = sizeof(PROCESSENTRY32);
     733                ProcEntry.dwSize = sizeof(PROCESSENTRY32W);
    734734                ProcEntry.szExeFile[0] = '\0';
    735735                if (g_pfnProcess32FirstW(hSnap, &ProcEntry))
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