VirtualBox

Changeset 17876 in vbox


Ignore:
Timestamp:
Mar 14, 2009 7:51:28 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
44430
Message:

more dhcp settings impl

File:
1 edited

Legend:

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

    r17874 r17876  
    46814681STDMETHODIMP VirtualBox::FindDhcpServerByName (IN_BSTR aName, IDhcpServer ** aServer)
    46824682{
    4683     return E_NOTIMPL;
     4683    CheckComArgNotNull(aName);
     4684    CheckComArgNotNull(aServer);
     4685
     4686    AutoCaller autoCaller (this);
     4687    CheckComRCReturnRC (autoCaller.rc());
     4688
     4689    AutoWriteLock alock (this);
     4690
     4691    HRESULT rc;
     4692    Bstr bstr;
     4693    ComPtr <DhcpServer> found;
     4694
     4695    for (DhcpServerList::const_iterator it =
     4696            mData.mDhcpServers.begin();
     4697         it != mData.mDhcpServers.end();
     4698         ++ it)
     4699    {
     4700        rc = (*it)->COMGETTER(NetworkName) (bstr.asOutParam());
     4701        CheckComRCThrowRC (rc);
     4702
     4703        if(bstr == aName)
     4704        {
     4705            found = *it;
     4706            break;
     4707        }
     4708    }
     4709
     4710    if (!found)
     4711        return E_INVALIDARG;
     4712
     4713    return found.queryInterfaceTo (aServer);
    46844714}
    46854715
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette