VirtualBox

Ignore:
Timestamp:
Jan 19, 2016 10:10:39 AM (9 years ago)
Author:
vboxsync
Message:

Forward-ported r104938, r104943, r104950, r104952, r104953, r104987, r104988, r104990 from 5.0:

  • VBoxStub: Lazy import DLLs not in the KnownDlls list (and then some) and check that we don't accidentally add new imports as time goes by.
  • VBoxStub: the dlls have export names, so use them instead of the ordinals.
  • VBoxDef2LazyLoad fixes and error reporting, fixed missing VBoxCheckImports dependency during use in VBoxStub.
  • iprt/initterm.h,vbox-img,VBoxStub: Introduced RTR3INIT_FLAGS_STANDALONE_APP for statically linked applications that are expected to run outside the normal VirtualBox installation directory and need to be on their toes wrt dynamic library search paths. (Only windows, really.) Also, _always_ initialize IPRT first, don't ever do anything before that unless it 104% must be done there.
  • RTR3INIT_FLAGS_STANDALONE_APP trumps concerns about Vista GUI
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/VBox

  • trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp

    r58556 r59404  
    802802    int argc    = __argc;
    803803
    804     /* Check if we're already running and jump out if so. */
    805     /* Do not use a global namespace ("Global\\") for mutex name here, will blow up NT4 compatibility! */
     804    /*
     805     * Init IPRT. This is _always_ the very first thing we do.
     806     */
     807    int vrc = RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_STANDALONE_APP);
     808    if (RT_FAILURE(vrc))
     809        return RTMsgInitFailure(vrc);
     810
     811    /*
     812     * Check if we're already running and jump out if so.
     813     *
     814     * Note! Do not use a global namespace ("Global\\") for mutex name here,
     815     *       will blow up NT4 compatibility!
     816     */
    806817    HANDLE hMutexAppRunning = CreateMutex(NULL, FALSE, "VBoxStubInstaller");
    807818    if (   hMutexAppRunning != NULL
     
    812823        hMutexAppRunning = NULL;
    813824        return RTEXITCODE_FAILURE;
    814     }
    815 
    816     /* Init IPRT. */
    817     int vrc = RTR3InitExe(argc, &argv, 0);
    818     if (RT_FAILURE(vrc))
    819     {
    820         /* Close the mutex for this application instance. */
    821         CloseHandle(hMutexAppRunning);
    822         hMutexAppRunning = NULL;
    823         return RTMsgInitFailure(vrc);
    824825    }
    825826
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