VirtualBox

Changeset 38636 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Sep 5, 2011 1:49:45 PM (13 years ago)
Author:
vboxsync
Message:

*,IPRT: Redid the ring-3 init to always convert the arguments to UTF-8.

Location:
trunk/src/VBox/Main
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/win/dllmain.cpp

    r35368 r38636  
    4646
    4747        // idempotent, so doesn't harm, and needed for COM embedding scenario
    48         RTR3Init();
     48        RTR3InitDll(0);
    4949    }
    5050    else if (dwReason == DLL_PROCESS_DETACH)
  • trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp

    r36527 r38636  
    17461746     * Initialize IPRT and check that we're correctly installed.
    17471747     */
    1748     int rc = RTR3Init();
     1748    int rc = RTR3InitExe(argc, &argv, 0);
    17491749    if (RT_FAILURE(rc))
    17501750        return RTMsgInitFailure(rc);
     
    18851885    NOREF(hPrevInstance); NOREF(nShowCmd); NOREF(lpCmdLine);
    18861886
    1887     int rc = RTR3Init();
     1887    int rc = RTR3InitExeNoArguments(0);
    18881888    if (RT_FAILURE(rc))
    18891889        return RTMsgInitFailure(rc);
  • trunk/src/VBox/Main/src-server/darwin/iokit.cpp

    r33540 r38636  
    16831683int main(int argc, char **argv)
    16841684{
    1685     RTR3Init();
     1685    RTR3InitExe(argc, &argv, 0);
    16861686
    16871687    if (1)
  • trunk/src/VBox/Main/src-server/generic/OpenGLTestApp.cpp

    r36344 r38636  
    211211    int rc = 0;
    212212
    213     RTR3Init();
     213    RTR3InitExe(argc, &argv, 0);
    214214
    215215    if(argc < 2)
  • trunk/src/VBox/Main/src-server/win/svcmain.cpp

    r37683 r38636  
    159159    LPCTSTR lpCmdLine = GetCommandLine(); /* this line necessary for _ATL_MIN_CRT */
    160160
    161     /* Need to parse the command line before initializing the VBox runtime. */
     161    /*
     162     * Need to parse the command line before initializing the VBox runtime.
     163     */
    162164    TCHAR szTokens[] = _T("-/");
    163165    LPCTSTR lpszToken = FindOneOf(lpCmdLine, szTokens);
     
    188190     * the support driver.
    189191     */
    190     RTR3Init();
     192    int    argc = __argc;
     193    char **argv = __argv;
     194    RTR3InitExe(argc, &argv, 0);
    191195
    192196    /* Note that all options are given lowercase/camel case/uppercase to
     
    233237
    234238    RTGETOPTSTATE   GetOptState;
    235     int vrc = RTGetOptInit(&GetOptState, __argc, __argv, &s_aOptions[0], RT_ELEMENTS(s_aOptions), 1, 0 /*fFlags*/);
     239    int vrc = RTGetOptInit(&GetOptState, argc, argv, &s_aOptions[0], RT_ELEMENTS(s_aOptions), 1, 0 /*fFlags*/);
    236240    AssertRC(vrc);
    237241
  • trunk/src/VBox/Main/src-server/xpcom/server.cpp

    r37666 r38636  
    789789     * the support driver
    790790     */
    791     RTR3Init();
     791    int vrc = RTR3InitExe(argc, &argv, 0);
     792    if (RT_FAILURE(vrc))
     793        return RTMsgInitFailure(vrc);
    792794
    793795    static const RTGETOPTDEF s_aOptions[] =
     
    811813
    812814    RTGETOPTSTATE   GetOptState;
    813     int vrc = RTGetOptInit(&GetOptState, argc, argv, &s_aOptions[0], RT_ELEMENTS(s_aOptions), 1, 0 /*fFlags*/);
     815    vrc = RTGetOptInit(&GetOptState, argc, argv, &s_aOptions[0], RT_ELEMENTS(s_aOptions), 1, 0 /*fFlags*/);
    814816    AssertRC(vrc);
    815817
  • trunk/src/VBox/Main/testcase/tstAPI.cpp

    r36128 r38636  
    201201     * the support driver.
    202202     */
    203     RTR3Init();
     203    RTR3InitExe(argc, &argv, 0);
    204204
    205205    HRESULT rc;
  • trunk/src/VBox/Main/testcase/tstCollector.cpp

    r35368 r38636  
    148148     * the support driver.
    149149     */
    150     int rc = RTR3Init();
    151     if (RT_FAILURE(rc))
    152     {
    153         RTPrintf("tstCollector: RTR3Init() -> %d\n", rc);
     150    int rc = RTR3InitExe(argc, &argv, 0);
     151    if (RT_FAILURE(rc))
     152    {
     153        RTPrintf("tstCollector: RTR3InitExe() -> %d\n", rc);
    154154        return 1;
    155155    }
  • trunk/src/VBox/Main/testcase/tstOVF.cpp

    r37862 r38636  
    282282int main(int argc, char *argv[])
    283283{
    284     RTR3Init();
     284    RTR3InitExe(argc, &argv, 0);
    285285
    286286    HRESULT rc = S_OK;
  • trunk/src/VBox/Main/webservice/vboxweb.cpp

    r37167 r38636  
    784784{
    785785    // initialize runtime
    786     int rc = RTR3Init();
     786    int rc = RTR3InitExe(argc, &argv, 0);
    787787    if (RT_FAILURE(rc))
    788788        return RTMsgInitFailure(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