IMcastAddressAllocation::CreateLeaseInfoFromVariant
Creates a lease information object for a subsequent call to RenewAddress or ReleaseAddress. This method is similar to CreateLeaseInfo but is used by Automation client languages such as Visual Basic.
HRESULT CreateLeaseInfoFromVariant(
DATE LeaseStartTime,
DATE LeaseStopTime,
VARIANT vAddresses,
BSTR pRequestID,
BSTR pServerAddress,
IMcastLeaseInfo **ppReleaseRequest
);
Parameters
- LeaseStartTime
- [in] The start time of the lease.
- LeaseStopTime
- [in] The stop time of the lease.
- vAddresses
- [in] A VARIANT containing a SAFEARRAY of BSTR strings. Each BSTR is an IP version 4 address in dotted quad notation (for example, 10.111.222.111).
- pRequestID
- [in] Pointer to a BSTR 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] Pointer to a BSTR specifying the 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. |
Remarks
The application must use SysAllocString to allocate memory for the pRequestID and pServerAddress parameters. The application must use SysFreeString to free the memory when the variables are no longer needed.
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, IMcastLeaseInfo