Share via


IVMDHCPVirtualNetworkServer::ConfigureDHCPLeaseTimes method

The ConfigureDHCPLeaseTimes method sets the lease time parameters for leases managed by the virtual DHCP server.

Syntax

HRESULT ConfigureDHCPLeaseTimes(
  [in] VARIANT leaseTime,
  [in] VARIANT leaseRenewalTime,
  [in] VARIANT leaseRebindingTime
);

Parameters

leaseTime [in]

The time in seconds after which leases granted by the virtual DHCP server expire. This number is passed as a VARIANT of type VT_DECIMAL.

leaseRenewalTime [in]

The time, in seconds, after which the client virtual machine should renew its TCP/IP address lease. This number is passed as a VARIANT of type VT_DECIMAL.

leaseRebindingTime [in]

The time in seconds after which the client virtual machine should rebind if the virtual DHCP server has not responded. This number is passed as a VARIANT of type VT_DECIMAL.

Return value

This method can return one of these values.

This method supports standard return values, as well as the following. For information on Virtual Server specific return values not listed below, see HRESULT Codes Specific to the Virtual Server.

Return code Description
S_OK
The operation was successful.
E_INVALIDARG
The calling parameters are invalid.
DISP_E_BADVARTYPE
One of the parameters could not be coerced into the correct data type.
DISP_E_OVERFLOW
The value specified in one of the parameters was greater than the maximum allowed value. Other HRESULT values may be returned.

Remarks

leaseRenewalTime must be less than leaseRebindingTime. Likewise, leaseRebindingTime must be less than leaseTime. All must be in the range 1..2^32-1.

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMDHCPVirtualNetworkServer