Platform SDK: TAPI

IMcastAddressAllocation::CreateLeaseInfo

Creates a lease information object for a subsequent call to RenewAddress or ReleaseAddress.

HRESULT CreateLeaseInfo(
  DATE LeaseStartTime,
  DATE LeaseStopTime,
  DWORD dwNumAddresses,
  LPWSTR *ppAddresses,
  LPWSTR pRequestID,
  LPWSTR pServerAddress,
  IMcastLeaseInfo **ppReleaseRequest
);

Parameters

LeaseStartTime
[in] The start time of the lease.
LeaseStopTime
[in] The stop time of the lease.
dwNumAddresses
[in] The number of addresses associated with the lease.
ppAddresses
[in] An array of LPWSTR pointers of size dwNumAddresses. Each LPWSTR is an IP version 4 address in dotted quad notation (for example, 10.111.222.111).
pRequestID
[in] An LPWSTR specifying the request ID for the original request. This is obtained by calling IMcastLeaseInfo::get_RequestID on the lease information object corresponding to the original request. The request ID should be saved in persistent storage between executions of the application program. If you are renewing or releasing a lease that was requested during the same run of the application, you have no reason to use CreateLeaseInfo; just pass the existing IMcastLeaseInfo pointer to RenewAddress or ReleaseAddress.
pServerAddress
[in] Specifies server address.
ppReleaseRequest
[out, retval] Pointer to IMcastLeaseInfo interface created.

Return Values

Value Meaning
S_OK Method succeeded.
E_POINTER The caller passed in an invalid pointer argument.
E_OUTOFMEMORY Not enough memory exists to create the required objects.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Version: Requires TAPI 3.0 or later.
  Header: Declared in Mdhcp.h.
  Library: Use Mdhcpid.lib.

See Also

IMcastAddressAllocation