Platform SDK: TAPI

IMcastAddressAllocation::RequestAddress

Obtains a new lease for one or more multicast addresses. The EnumerateScopes or get_Scopes method must be called first.

HRESULT RequestAddress(
  IMcastScope * pScope,
  DATE LeaseStartTime,
  DATE LeaseStopTime,
  long NumAddresses,
  IMcastLeaseInfo **ppLeaseResponse
);

Parameters

pScope
[in] Identifies the multicast scope from which the application needs an address. The application first calls get_Scopes or EnumerateScopes to obtain a list of available scopes.
LeaseStartTime
[in] Requested time for the lease on these addresses to start. The start time that is actually granted may be different.
LeaseStopTime
[in] Requested time for the lease on these addresses to stop. The stop time that is actually granted may be different.
NumAddresses
[in] The number of addresses requested. Fewer addresses may actually be granted.
ppLeaseResponse
[out] Pointer to an interface pointer that will be set to point to a new IMcastLeaseInfo object. This interface can then be used to discover the actual attributes of the granted lease. See IMcastScope for more information.

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.
E_INVALIDARG Requested stop time is prior to requested stop time.

Remarks

Although these COM interfaces and their implementation support allocation of multiple addresses at a time, multiple allocation is not currently supported by the underlying Win32 calls. You may need to use a loop for multiple address allocation.

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