VirtualBox

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


Ignore:
Timestamp:
Mar 14, 2009 7:01:57 PM (16 years ago)
Author:
vboxsync
Message:

more dhcp settings

File:
1 edited

Legend:

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

    r17872 r17874  
    46554655STDMETHODIMP VirtualBox::CreateDhcpServer (IN_BSTR aName, IDhcpServer ** aServer)
    46564656{
    4657     return E_NOTIMPL;
     4657    CheckComArgNotNull(aName);
     4658    CheckComArgNotNull(aServer);
     4659
     4660    AutoCaller autoCaller (this);
     4661    CheckComRCReturnRC (autoCaller.rc());
     4662
     4663    ComObjPtr<DhcpServer> dhcpServer;
     4664    dhcpServer.createObject();
     4665    HRESULT rc = dhcpServer->init (aName);
     4666    CheckComRCReturnRC (rc);
     4667
     4668    rc = registerDhcpServer(dhcpServer, true);
     4669    CheckComRCReturnRC (rc);
     4670
     4671    dhcpServer.queryInterfaceTo(aServer);
     4672
     4673    return rc;
    46584674}
    46594675
     
    46704686STDMETHODIMP VirtualBox::RemoveDhcpServer (IDhcpServer * aServer)
    46714687{
    4672     return E_NOTIMPL;
     4688    CheckComArgNotNull(aServer);
     4689
     4690    AutoCaller autoCaller (this);
     4691    CheckComRCReturnRC (autoCaller.rc());
     4692
     4693    HRESULT rc = unregisterDhcpServer(static_cast<DhcpServer *>(aServer), true);
     4694
     4695    return rc;
    46734696}
    46744697
     
    47104733    ComPtr<IDhcpServer> existing;
    47114734    rc = FindDhcpServerByName(name.mutableRaw(), existing.asOutParam());
    4712     CheckComRCReturnRC (rc);
     4735    if(SUCCEEDED(rc))
     4736    {
     4737        return E_FAIL;
     4738    }
    47134739
    47144740    mData.mDhcpServers.push_back (aDhcpServer);
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