VirtualBox

Changeset 14934 in vbox for trunk/src


Ignore:
Timestamp:
Dec 3, 2008 10:39:39 AM (16 years ago)
Author:
vboxsync
Message:

#3285: Improve error handling API to include unique error numbers
Document

  • IVirtualBox::getDVDImage
  • IVirtualBox::findDVDImage
  • IVirtualBox::openFloppyImage
  • IVirtualBox::getFloppyImage
  • IVirtualBox::findFloppyImage
  • IVirtualBox::getGuestOSType
  • IVirtualBox::createSharedFolder
  • IVirtualBox::removeSharedFolder
  • IVirtualBox::getNextExtraDataKey
  • IVirtualBox::getExtraData
  • IVirtualBox::setExtraData
  • IVirtualBox::openSession
  • IVirtualBox::openRemoteSession
  • IVirtualBox::openExistingSession
  • IVirtualBox::registerCallback
  • IVirtualBox::unregisterCallback
  • IVirtualBox::waitForPropertyChange
  • IVirtualBox::saveSettings
  • IVirtualBox::saveSettingsWithBackup
Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r14904 r14934  
    34053405    if (mData->mSession.mState == SessionState_Open ||
    34063406        mData->mSession.mState == SessionState_Closing)
    3407         return setError (E_ACCESSDENIED,
     3407        return setError (VBOX_E_INVALID_OBJECT_STATE,
    34083408            tr ("A session for the machine '%ls' is currently open "
    34093409                "(or being closed)"),
     
    34133413    AssertReturn (mData->mMachineState < MachineState_Running, E_FAIL);
    34143414
    3415     /* get the sesion PID */
     3415    /* get the session PID */
    34163416    RTPROCESS pid = NIL_RTPROCESS;
    34173417    AssertCompile (sizeof (ULONG) == sizeof (RTPROCESS));
     
    34733473        LogFlowThisFunc (("AssignMachine() returned %08X\n", rc));
    34743474
    3475         /* The failure may w/o any error info (from RPC), so provide one */
     3475        /* The failure may occur w/o any error info (from RPC), so provide one */
    34763476        if (FAILED (rc))
    3477             setError (rc,
    3478                 tr ("Failed to assign the machine to the session"));
     3477            setError (VBOX_E_VM_ERROR,
     3478                tr ("Failed to assign the machine to the session (%Rrc)"), rc);
    34793479
    34803480        if (SUCCEEDED (rc) && origState == SessionState_Spawning)
     
    34933493            }
    34943494
    3495             /* assign machine & console to the remote sesion */
     3495            /* assign machine & console to the remote session */
    34963496            if (SUCCEEDED (rc))
    34973497            {
     
    35053505                LogFlowThisFunc (("AssignRemoteMachine() returned %08X\n", rc));
    35063506
    3507                 /* The failure may w/o any error info (from RPC), so provide one */
     3507                /* The failure may occur w/o any error info (from RPC), so provide one */
    35083508                if (FAILED (rc))
    3509                     setError (rc,
    3510                         tr ("Failed to assign the machine to the remote session"));
     3509                    setError (VBOX_E_VM_ERROR,
     3510                        tr ("Failed to assign the machine to the remote session (%Rrc)"), rc);
    35113511            }
    35123512
     
    35223522    }
    35233523
    3524     /* finalize spawning amyway (this is why we don't return on errors above) */
     3524    /* finalize spawning anyway (this is why we don't return on errors above) */
    35253525    if (mData->mSession.mState == SessionState_Spawning)
    35263526    {
     
    36123612        mData->mSession.mState == SessionState_Spawning ||
    36133613        mData->mSession.mState == SessionState_Closing)
    3614         return setError (E_ACCESSDENIED,
     3614        return setError (VBOX_E_INVALID_OBJECT_STATE,
    36153615            tr ("A session for the machine '%ls' is currently open "
    36163616                "(or being opened or closed)"),
     
    36893689    if (type == "gui" || type == "GUI/Qt4")
    36903690    {
    3691 # ifdef RT_OS_DARWIN /* Avoid Lanuch Services confusing this with the selector by using a helper app. */
     3691# ifdef RT_OS_DARWIN /* Avoid Launch Services confusing this with the selector by using a helper app. */
    36923692        const char VirtualBox_exe[] = "../Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM";
    36933693# else
     
    37943794
    37953795    if (RT_FAILURE (vrc))
    3796         return setError (E_FAIL,
     3796        return setError (VBOX_E_IPRT_ERROR,
    37973797            tr ("Could not launch a process for the machine '%ls' (%Rrc)"),
    37983798            mUserData->mName.raw(), vrc);
     
    38183818        /* restore the session state */
    38193819        mData->mSession.mState = SessionState_Closed;
    3820         /* The failure may w/o any error info (from RPC), so provide one */
    3821         return setError (rc,
    3822             tr ("Failed to assign the machine to the session"));
     3820        /* The failure may occur w/o any error info (from RPC), so provide one */
     3821        return setError (VBOX_E_VM_ERROR,
     3822            tr ("Failed to assign the machine to the session (%Rrc)"), rc);
    38233823    }
    38243824
     
    38573857
    38583858    if (mData->mSession.mState != SessionState_Open)
    3859         return setError (E_ACCESSDENIED,
     3859        return setError (VBOX_E_INVALID_SESSION_STATE,
    38603860            tr ("The machine '%ls' does not have an open session"),
    38613861            mUserData->mName.raw());
     
    38723872    if (FAILED (rc))
    38733873    {
    3874         /* The failure may w/o any error info (from RPC), so provide one */
    3875         return setError (rc,
    3876             tr ("Failed to get a console object from the direct session"));
     3874        /* The failure may occur w/o any error info (from RPC), so provide one */
     3875        return setError (VBOX_E_VM_ERROR,
     3876            tr ("Failed to get a console object from the direct session (%Rrc)"), rc);
    38773877    }
    38783878
     
    38953895    LogFlowThisFunc (("AssignRemoteMachine() returned %08X\n", rc));
    38963896
    3897     /* The failure may w/o any error info (from RPC), so provide one */
     3897    /* The failure may occur w/o any error info (from RPC), so provide one */
    38983898    if (FAILED (rc))
    3899         return setError (rc,
    3900             tr ("Failed to assign the machine to the session"));
     3899        return setError (VBOX_E_VM_ERROR,
     3900            tr ("Failed to assign the machine to the session (%Rrc)"), rc);
    39013901
    39023902    alock.enter();
     
    39073907        aControl->Uninitialize();
    39083908
    3909         return setError (E_ACCESSDENIED,
     3909        return setError (VBOX_E_INVALID_SESSION_STATE,
    39103910            tr ("The machine '%ls' does not have an open session"),
    39113911            mUserData->mName.raw());
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r14931 r14934  
    12071207    CheckComRCReturnRC (autoCaller.rc());
    12081208
    1209     HRESULT rc = E_FAIL;
     1209    HRESULT rc = VBOX_E_FILE_ERROR;
    12101210
    12111211    Guid id = aId;
     
    12811281    CheckComRCReturnRC (autoCaller.rc());
    12821282
    1283     HRESULT rc = E_FAIL;
     1283    HRESULT rc = VBOX_E_FILE_ERROR;
    12841284
    12851285    Guid id = aId;
     
    13051305STDMETHODIMP VirtualBox::GetFloppyImage (INPTR GUIDPARAM aId,
    13061306                                         IFloppyImage2 **aFloppyImage)
     1307
    13071308{
    13081309    if (!aFloppyImage)
     
    14871488
    14881489        if (aKey != NULL)
    1489             return setError (E_FAIL,
     1490            return setError (VBOX_E_OBJECT_NOT_FOUND,
    14901491                tr ("Could not find the extra data key '%ls'"), aKey);
    14911492    }
     
    16411642            else
    16421643            {
    1643                 /* an old value does for sure exist here (XML schema
    1644                  * guarantees that "value" may not absent in the
    1645                  * <ExtraDataItem> element) */
     1644                /* An old value does for sure exist here (XML schema
     1645                 * guarantees that "value" may not be absent in the
     1646                 * <ExtraDataItem> element). */
    16461647                Assert (!extraDataItemNode.isNull());
    16471648                extraDataItemNode.zap();
     
    16891690
    16901691    if (state != SessionState_Closed)
    1691         return setError (E_INVALIDARG,
     1692        return setError (VBOX_E_INVALID_OBJECT_STATE,
    16921693            tr ("The given session is already open or being opened"));
    16931694
     
    17431744
    17441745    if (state != SessionState_Closed)
    1745         return setError (E_INVALIDARG,
     1746        return setError (VBOX_E_INVALID_OBJECT_STATE,
    17461747            tr ("The given session is already open or being opened"));
    17471748
     
    17981799
    17991800    if (state != SessionState_Closed)
    1800         return setError (E_INVALIDARG,
     1801        return setError (VBOX_E_INVALID_OBJECT_STATE,
    18011802            tr ("The given session is already open or being opened"));
    18021803
     
    26032604 *
    26042605 *  @return
    2605  *      S_OK when found or E_INVALIDARG when not found
     2606 *      S_OK when found or VBOX_E_OBJECT_NOT_FOUND when not found
    26062607 *
    26072608 *  @note Locks this object for reading.
     
    26322633    }
    26332634
    2634     HRESULT rc = found ? S_OK : E_INVALIDARG;
     2635    HRESULT rc = found ? S_OK : VBOX_E_OBJECT_NOT_FOUND;
    26352636
    26362637    if (aSetError && !found)
    26372638    {
    2638         setError (VBOX_E_FILE_ERROR,
     2639        setError (VBOX_E_OBJECT_NOT_FOUND,
    26392640            tr ("Could not find a registered machine with UUID {%RTuuid}"),
    26402641            aId.raw());
     
    27472748        int vrc = calculateFullPath (Utf8Str (aLocation), location);
    27482749        if (RT_FAILURE (vrc))
    2749             return setError (E_FAIL,
     2750            return setError (VBOX_E_FILE_ERROR,
    27502751                tr ("Invalid image file location '%ls' (%Rrc)"),
    27512752                aLocation, vrc);
     
    27742775    }
    27752776
    2776     HRESULT rc = found ? S_OK : E_INVALIDARG;
     2777    HRESULT rc = found ? S_OK : VBOX_E_OBJECT_NOT_FOUND;
    27772778
    27782779    if (aSetError && !found)
     
    28192820        int vrc = calculateFullPath (Utf8Str (aLocation), location);
    28202821        if (RT_FAILURE (vrc))
    2821             return setError (E_FAIL,
     2822            return setError (VBOX_E_FILE_ERROR,
    28222823                tr ("Invalid image file location '%ls' (%Rrc)"),
    28232824                aLocation, vrc);
     
    28462847    }
    28472848
    2848     HRESULT rc = found ? S_OK : E_INVALIDARG;
     2849    HRESULT rc = found ? S_OK : VBOX_E_OBJECT_NOT_FOUND;
    28492850
    28502851    if (aSetError && !found)
     
    31433144    HRESULT rc = S_OK;
    31443145
    3145     /* serialize file access (prevent concurrent reads and writes) */
     3146    /* serialize file access (prevents concurrent reads and writes) */
    31463147    AutoWriteLock alock (this);
    31473148
     
    34703471    if (!conflict.isNull())
    34713472    {
    3472         return setError (VBOX_E_FILE_ERROR,
     3473        return setError (VBOX_E_INVALID_OBJECT_STATE,
    34733474            tr ("Cannot register the CD/DVD image '%ls' with UUID {%RTuuid} "
    34743475                "because a %s already exists in the media registry ('%ls')"),
     
    35713572    if (!conflict.isNull())
    35723573    {
    3573         return setError (E_INVALIDARG,
     3574        return setError (VBOX_E_INVALID_OBJECT_STATE,
    35743575            tr ("Cannot register the floppy image '%ls' with UUID {%RTuuid} "
    35753576                "because a %s already exists in the media registry ('%ls')"),
     
    38093810            throw;
    38103811
    3811         return setError (E_FAIL,
     3812        return setError (VBOX_E_FILE_ERROR,
    38123813                         tr ("Could not load the settings file '%s' (%Rrc)"),
    38133814                         aFile.uri(), err.rc());
     
    38203821            throw;
    38213822
    3822         return setError (E_FAIL,
     3823        return setError (VBOX_E_XML_ERROR,
    38233824                         tr ("Could not load the settings file '%s'.\n%s"),
    38243825                         aFile.uri(),
     
    38603861    {
    38613862        /* this is the only expected exception for now */
    3862         return setError (E_FAIL,
     3863        return setError (VBOX_E_FILE_ERROR,
    38633864                         tr ("Could not save the settings file '%s' (%Rrc)"),
    38643865                         aFile.uri(), err.rc());
     
    39013902
    39023903    if (RT_FAILURE (vrc))
    3903         return setError (E_FAIL,
     3904        return setError (VBOX_E_IPRT_ERROR,
    39043905            tr ("Could not copy the settings file '%s' to '%s' (%Rrc)"),
    39053906            of.raw(), nf.raw(), vrc);
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r14931 r14934  
    322322  </result>
    323323
     324  <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
     325    <desc>
     326      Invalid XML found.
     327    </desc>
     328  </result>
     329
     330  <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
     331    <desc>
     332      Current session state prohibits operation.
     333    </desc>
     334  </result>
     335
    324336  <!--
    325337    Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
     
    17871799        </note>
    17881800
    1789         <result name="VBOX_E_FILE_ERROR">
    1790           Image conflicts with another in the media registry.
     1801        <result name="VBOX_E_INVALID_OBJECT_STATE">
     1802          CD/DVD image already exists in the media registry.
    17911803        </result>
    17921804
     
    18161828        installation, i.e. it must be previously opened by <link
    18171829        to="#openDVDImage()"/>, or mounted to some known virtual machine.
     1830
     1831        <result name="VBOX_E_OBJECT_NOT_FOUND">
     1832          No matching DVD image found in the media registry.
     1833        </result>
     1834
    18181835      </desc>
    18191836      <param name="id" type="uuid" dir="in">
     
    18351852        The search is done by comparing the value of the @a location argument to
    18361853        the <link to="IMedium::location"/> attribute of each known CD/DVD image.
     1854
     1855        The requested location can be a path relative to the
     1856        <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
     1857        only a file name without any path is given, the
     1858        <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
     1859        folder</link> will be prepended to the file name before searching. Note
     1860        that on case sensitive file systems, a case sensitive comparison is
     1861        performed, otherwise the case in the file path is ignored.
     1862
     1863        <result name="VBOX_E_FILE_ERROR">
     1864          Invalid image file location.
     1865        </result>
     1866        <result name="VBOX_E_OBJECT_NOT_FOUND">
     1867          No matching DVD image found in the media registry.
     1868        </result>
     1869
     1870      </desc>
     1871      <param name="location" type="wstring" dir="in">
     1872        <desc>CD/DVD image file path to look for.</desc>
     1873      </param>
     1874      <param name="image" type="IDVDImage2" dir="return">
     1875        <desc>Found CD/DVD image object.</desc>
     1876      </param>
     1877    </method>
     1878
     1879    <method name="openFloppyImage">
     1880      <desc>
     1881        Opens a floppy image contained in the specified file of the supported
     1882        format and assigns it the given UUID.
     1883
     1884        After the image is successfully opened by this method, it gets
     1885        remembered by (known to) this VirtualBox installation and will be
     1886        accessible through <link to="#getFloppyImage()"/> and
     1887        <link to="#findFloppyImage()"/> methods. Remembered images are also
     1888        returned as part of the <link to="#floppyImages"/> array and can be
     1889        mounted to virtual machines. See IMedium for more details.
     1890
     1891        See <link to="IMedium::location"/> to get more details about the format
     1892        of the location string.
     1893
     1894        <result name="VBOX_E_FILE_ERROR">
     1895          Floppy image specified by @a location not accessible.
     1896        </result>
     1897        <result name="VBOX_E_INVALID_OBJECT_STATE">
     1898          Floppy image already exists in the media registry.
     1899        </result>
     1900
     1901        <note>
     1902          Currently, only raw floppy images are supported by VirtualBox.
     1903        </note>
     1904      </desc>
     1905      <param name="location" type="wstring" dir="in">
     1906        <desc>
     1907          Full path to the file that contains a valid floppy image.
     1908        </desc>
     1909      </param>
     1910      <param name="id" type="uuid" dir="in">
     1911        <desc>
     1912          UUID to assign to the given image file within this VirtualBox
     1913          installation. If an empty (null) UUID is specified, the system will
     1914          randomly generate a new UUID.
     1915        </desc>
     1916      </param>
     1917      <param name="image" type="IFloppyImage2" dir="return">
     1918        <desc>Opened floppy image object.</desc>
     1919      </param>
     1920    </method>
     1921
     1922    <method name="getFloppyImage">
     1923      <desc>
     1924        Returns a floppy image with the given UUID.
     1925
     1926        The image with the given UUID must be known to this VirtualBox
     1927        installation, i.e. it must be previously opened by <link
     1928        to="#openFloppyImage()"/>, or mounted to some known virtual machine.
     1929
     1930        <result name="VBOX_E_OBJECT_NOT_FOUND">
     1931          No matching floppy image found in the media registry.
     1932        </result>
     1933
     1934      </desc>
     1935      <param name="id" type="uuid" dir="in">
     1936        <desc>UUID of the image to look for.</desc>
     1937      </param>
     1938      <param name="image" type="IFloppyImage2" dir="return">
     1939        <desc>Found floppy image object.</desc>
     1940      </param>
     1941    </method>
     1942
     1943    <method name="findFloppyImage">
     1944      <desc>
     1945        Returns a floppy image with the given image location.
     1946
     1947        The image with the given UUID must be known to this VirtualBox
     1948        installation, i.e. it must be previously opened by <link
     1949        to="#openFloppyImage()"/>, or mounted to some known virtual machine.
     1950
     1951        The search is done by comparing the value of the @a location argument to
     1952        the <link to="IMedium::location"/> attribute of each known floppy image.
    18371953
    18381954        The requested location can be a path relative to the
     
    18431959        that on case sensitive file systems, a case sensitive comparison is
    18441960        performed, otherwise the case of symbols in the file path is ignored.
    1845       </desc>
    1846       <param name="location" type="wstring" dir="in">
    1847         <desc>CD/DVD image file path to look for.</desc>
    1848       </param>
    1849       <param name="image" type="IDVDImage2" dir="return">
    1850         <desc>Found CD/DVD image object.</desc>
    1851       </param>
    1852     </method>
    1853 
    1854     <method name="openFloppyImage">
    1855       <desc>
    1856         Opens a floppy image contained in the specified file of the supported
    1857         format and assigns it the given UUID.
    1858 
    1859         After the image is successfully opened by this method, it gets
    1860         remembered by (known to) this VirtualBox installation and will be
    1861         accessible through <link to="#getFloppyImage()"/> and
    1862         <link to="#findFloppyImage()"/> methods. Remembered images are also
    1863         returned as part of the <link to="#floppyImages"/> array and can be
    1864         mounted to virtual machines. See IMedium for more details.
    1865 
    1866         See <link to="IMedium::location"/> to get more details about the format
    1867         of the location string.
    1868 
    1869         <note>
    1870           Currently, only raw floppy images are supported by VirtualBox.
    1871         </note>
    1872       </desc>
    1873       <param name="location" type="wstring" dir="in">
    1874         <desc>
    1875           Full path to the file that contains a valid floppy image.
    1876         </desc>
    1877       </param>
    1878       <param name="id" type="uuid" dir="in">
    1879         <desc>
    1880           UUID to assign to the given image file within this VirtualBox
    1881           installation. If an empty (null) UUID is specified, the system will
    1882           randomly generate a new UUID.
    1883         </desc>
    1884       </param>
    1885       <param name="image" type="IFloppyImage2" dir="return">
    1886         <desc>Opened floppy image object.</desc>
    1887       </param>
    1888     </method>
    1889 
    1890     <method name="getFloppyImage">
    1891       <desc>
    1892         Returns a floppy image with the given UUID.
    1893 
    1894         The image with the given UUID must be known to this VirtualBox
    1895         installation, i.e. it must be previously opened by <link
    1896         to="#openFloppyImage()"/>, or mounted to some known virtual machine.
    1897       </desc>
    1898       <param name="id" type="uuid" dir="in">
    1899         <desc>UUID of the image to look for.</desc>
    1900       </param>
    1901       <param name="image" type="IFloppyImage2" dir="return">
    1902         <desc>Found floppy image object.</desc>
    1903       </param>
    1904     </method>
    1905 
    1906     <method name="findFloppyImage">
    1907       <desc>
    1908         Returns a floppy image with the given image location.
    1909 
    1910         The image with the given UUID must be known to this VirtualBox
    1911         installation, i.e. it must be previously opened by <link
    1912         to="#openFloppyImage()"/>, or mounted to some known virtual machine.
    1913 
    1914         The search is done by comparing the value of the @a location argument to
    1915         the <link to="IMedium::location"/> attribute of each known floppy image.
    1916 
    1917         The requested location can be a path relative to the
    1918         <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
    1919         only a file name without any path is given, the
    1920         <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
    1921         folder</link> will be prepended to the file name before searching. Note
    1922         that on case sensitive file systems, a case sensitive comparison is
    1923         performed, otherwise the case of symbols in the file path is ignored.
     1961
     1962        <result name="VBOX_E_FILE_ERROR">
     1963          Invalid image file location.
     1964        </result>
     1965        <result name="VBOX_E_OBJECT_NOT_FOUND">
     1966          No matching floppy image found in the media registry.
     1967        </result>
     1968
    19241969      </desc>
    19251970      <param name="location" type="wstring" dir="in">
     
    19451990        <link to="IGuestOSType::id"/> attribute which contains an identifier of
    19461991        the guest OS this object describes.
     1992
     1993        <result name="E_INVALIDARG">
     1994          @a id is not a valid Guest OS type.
     1995        </result>
     1996
    19471997      </desc>
    19481998      <param name="id" type="wstring" dir="in">
     
    19602010        folders and starts sharing it. Refer to the description of
    19612011        <link to="ISharedFolder"/> to read more about logical names.
     2012        <note>
     2013          In the current implementation, this operation is not
     2014          implemented.
     2015        </note>
    19622016      </desc>
    19632017      <param name="name" type="wstring" dir="in">
     
    19772031        created by <link to="#createSharedFolder"/> from the collection of
    19782032        shared folders and stops sharing it.
     2033        <note>
     2034          In the current implementation, this operation is not
     2035          implemented.
     2036        </note>
    19792037      </desc>
    19802038      <param name="name" type="wstring" dir="in">
     
    19922050        nextKey (if there is any). @a nextValue is an optional parameter and
    19932051        if supplied, the next key's value is returned in it.
     2052
     2053        <result name="VBOX_E_OBJECT_NOT_FOUND">
     2054          Extra data @a key not found.
     2055        </result>
     2056
    19942057      </desc>
    19952058      <param name="key" type="wstring" dir="in">
     
    20102073        If the requested data @a key does not exist, this function will
    20112074        succeed and return @c NULL in the @a value argument.
     2075
     2076        <result name="VBOX_E_FILE_ERROR">
     2077          Settings file not accessible.
     2078        </result>
     2079        <result name="VBOX_E_XML_ERROR">
     2080          Could not parse the settings file.
     2081        </result>
     2082
    20122083      </desc>
    20132084      <param name="key" type="wstring" dir="in">
     
    20392110          change.
    20402111        </note>
     2112
     2113        <result name="VBOX_E_FILE_ERROR">
     2114          Settings file not accessible.
     2115        </result>
     2116        <result name="VBOX_E_XML_ERROR">
     2117          Could not parse the settings file.
     2118        </result>
     2119        <result name="E_ACCESSDENIED">
     2120          Modification request refused.
     2121        </result>
     2122
    20412123      </desc>
    20422124      <param name="key" type="wstring" dir="in">
     
    20992181        <li>Close the session by calling <link to="ISession::close()"/>.</li>
    21002182        </ol>
     2183
     2184        <result name="E_UNEXPECTED">
     2185          Virtual machine not registered.
     2186        </result>
     2187        <result name="E_ACCESSDENIED">
     2188          Process not started by OpenRemoteSession.
     2189        </result>
     2190        <result name="VBOX_E_INVALID_OBJECT_STATE">
     2191          Session already open or being opened.
     2192        </result>
     2193        <result name="VBOX_E_VM_ERROR">
     2194          Failed to assign machine to session.
     2195        </result>
     2196
    21012197      </desc>
    21022198      <param name="session" type="ISession" dir="in">
     
    21272223        that such prevent conflicting changes, one cannot open a remote session
    21282224        for a VM that already has another open session (direct or remote), or
    2129         is currently in the process of opening one (see <link to="IMachine::sessionState"/>).
     2225        is currently in the process of opening one (see <link
     2226          to="IMachine::sessionState"/>).
    21302227
    21312228        While the remote session still provides some level of control over the
     
    21742271
    21752272        <see>openExistingSession</see>
     2273
     2274        <result name="E_UNEXPECTED">
     2275          Virtual machine not registered.
     2276        </result>
     2277        <result name="E_INVALIDARG">
     2278          Invalid session type @a type.
     2279        </result>
     2280        <result name="VBOX_E_OBJECT_NOT_FOUND">
     2281          No machine matching @a machineId found.
     2282        </result>
     2283        <result name="VBOX_E_INVALID_OBJECT_STATE">
     2284          Session already open or being opened.
     2285        </result>
     2286        <result name="VBOX_E_IPRT_ERROR">
     2287          Launching process for machine failed.
     2288        </result>
     2289        <result name="VBOX_E_VM_ERROR">
     2290          Failed to assign machine to session.
     2291        </result>
     2292
    21762293      </desc>
    21772294      <param name="session" type="ISession" dir="in">
     
    22172334          doesn't have an open direct session.
    22182335        </note>
     2336
     2337        <result name="E_UNEXPECTED">
     2338          Virtual machine not registered.
     2339        </result>
     2340        <result name="VBOX_E_OBJECT_NOT_FOUND">
     2341          No machine matching @a machineId found.
     2342        </result>
     2343        <result name="VBOX_E_INVALID_OBJECT_STATE">
     2344          Session already open or being opened.
     2345        </result>
     2346        <result name="VBOX_E_INVALID_SESSION_STATE">
     2347          Direct session state not Open.
     2348        </result>
     2349        <result name="VBOX_E_VM_ERROR">
     2350          Failed to get console object from direct session or assign
     2351          machine to session.
     2352        </result>
    22192353
    22202354        <see>openRemoteSession</see>
     
    22412375        callback object will be called by VirtualBox when an appropriate
    22422376        event occurs.
     2377
     2378        <result name="E_INVALIDARG">
     2379          Registering a @c NULL @a callback is pretty pointless, ain't it?
     2380          <!-- See if someone is actually reading this and objects :-) -->
     2381        </result>
     2382
    22432383      </desc>
    22442384      <param name="callback" type="IVirtualBoxCallback" dir="in">
     
    22502390      <desc>
    22512391        Unregisters the previously registered global VirtualBox callback.
     2392
     2393        <result name="E_INVALIDARG">
     2394          Specified @a callback not registered.
     2395        </result>
     2396
    22522397      </desc>
    22532398      <param name="callback" type="IVirtualBoxCallback" dir="in">
     
    23242469        </table>
    23252470
     2471        <note>
     2472          This function is not implemented in the current version of the
     2473          product.
     2474        </note>
    23262475      </desc>
    23272476      <param name="what" type="wstring" dir="in">
     
    23552504        Normally, the global settings file is implicitly saved when a global
    23562505        setting is changed.
     2506
     2507        <result name="VBOX_E_FILE_ERROR">
     2508          Settings file not accessible.
     2509        </result>
     2510        <result name="VBOX_E_XML_ERROR">
     2511          Could not parse the settings file.
     2512        </result>
     2513
    23572514      </desc>
    23582515    </method>
     
    23982555
    23992556        <see>settingsFileVersion</see>
     2557
     2558        <result name="VBOX_E_FILE_ERROR">
     2559          Settings file not accessible.
     2560        </result>
     2561        <result name="VBOX_E_XML_ERROR">
     2562          Could not parse the settings file.
     2563        </result>
     2564        <result name="VBOX_E_IPRT_ERROR">
     2565          Could not copy the settings file.
     2566        </result>
     2567
    24002568      </desc>
    24012569      <param name="bakFileName" type="wstring" dir="return">
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