VirtualBox

Changeset 29728 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
May 21, 2010 12:28:48 PM (15 years ago)
Author:
vboxsync
Message:

IPRT/process-win: Beautified.

File:
1 edited

Legend:

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

    r29727 r29728  
    295295                    {
    296296                        /*
    297                          * So we found a VBoxTray instance which belongs to the user we want to
     297                         * So we found the process instance which belongs to the user we want to
    298298                         * to run our new process under. This duplicated token will be used for
    299299                         * the actual CreateProcessAsUserW() call then.
     
    500500         * we have to do the following:
    501501         * - Check the credentials supplied and get the user SID.
    502          * - If valid get the correct VBoxTray instance corresponding to that
     502         * - If valid get the correct Explorer/VBoxTray instance corresponding to that
    503503         *   user. This of course is only possible if that user is logged in (over
    504504         *   physical console or terminal services).
    505          * - If we found the user's VBoxTray app, use and modify the token to
     505         * - If we found the user's Explorer/VBoxTray app, use and modify the token to
    506506         *   use it in order to allow the newly started process acess the user's
    507          *   desktop. If there's no VBoxTray app we cannot display the started
     507         *   desktop. If there's no Explorer/VBoxTray app we cannot display the started
    508508         *   process (but run it without UI).
    509509         *
     
    535535
    536536        BOOL fFound = FALSE;
    537         HANDLE hTokenVBoxTray = INVALID_HANDLE_VALUE;
     537        HANDLE hTokenUserDesktop = INVALID_HANDLE_VALUE;
    538538        if (fRc)
    539539        {
     
    585585                                                         "explorer.exe"
    586586#endif
    587                                                          pSID, &hTokenVBoxTray);
     587                                                         pSID, &hTokenUserDesktop);
    588588                    }
    589589                    else
     
    604604             * desktop interaction without UI.
    605605             */
    606             phToken = fFound ? &hTokenVBoxTray : &hTokenLogon;
     606            phToken = fFound ? &hTokenUserDesktop : &hTokenLogon;
    607607
    608608            /*
     
    628628                dwErr = GetLastError(); /* CreateProcessAsUserW() failed. */
    629629
    630             if (hTokenVBoxTray != INVALID_HANDLE_VALUE)
    631                 CloseHandle(hTokenVBoxTray);
     630            if (hTokenUserDesktop != INVALID_HANDLE_VALUE)
     631                CloseHandle(hTokenUserDesktop);
    632632            CloseHandle(hTokenLogon);
    633633        }
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