VirtualBox

Ignore:
Timestamp:
May 1, 2016 12:58:10 PM (9 years ago)
Author:
vboxsync
Message:

IPRT/SUPR3Init/win: Must initialize the program path before the support library. On windows SUPR3Init will query the path if the driver service isn't registered.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/init.cpp

    r59404 r60773  
    430430    AssertMsgRCReturn(rc, ("Failed to initialize threads, rc=%Rrc!\n", rc), rc);
    431431
     432    /*
     433     * The executable path before SUPLib (windows requirement).
     434     */
     435    rc = rtR3InitProgramPath(pszProgramPath);
     436    AssertLogRelMsgRCReturn(rc, ("Failed to get executable directory path, rc=%Rrc!\n", rc), rc);
     437
    432438#if !defined(IN_GUEST) && !defined(RT_NO_GIP)
     439    /*
     440     * Initialize SUPLib here so the GIP can get going as early as possible
     441     * (improves accuracy for the first client).
     442     */
    433443    if (fFlags & RTR3INIT_FLAGS_SUPLIB)
    434444    {
    435         /*
    436          * Init GIP first.
    437          * (The more time for updates before real use, the better.)
    438          */
    439445        rc = SUPR3Init(NULL);
    440446        AssertMsgRCReturn(rc, ("Failed to initializable the support library, rc=%Rrc!\n", rc), rc);
     
    443449
    444450    /*
    445      * The executable path, name and directory.  Convert arguments.
    446      */
    447     rc = rtR3InitProgramPath(pszProgramPath);
    448     AssertLogRelMsgRCReturn(rc, ("Failed to get executable directory path, rc=%Rrc!\n", rc), rc);
    449 
     451     * Convert arguments.
     452     */
    450453    rc = rtR3InitArgv(fFlags, cArgs, ppapszArgs);
    451454    AssertLogRelMsgRCReturn(rc, ("Failed to convert the arguments, rc=%Rrc!\n", rc), rc);
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