IMcastAddressAllocation::CreateLeaseInfoFromVariant method (mdhcp.h)

[Rendezvous IP Telephony Conferencing controls and interfaces are not available for use in Windows Vista, Windows Server 2008, and subsequent versions of the operating system. The RTC Client API provides similar functionality.]

The CreateLeaseInfoFromVariant method 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.

Syntax

HRESULT CreateLeaseInfoFromVariant(
  DATE            LeaseStartTime,
  DATE            LeaseStopTime,
  VARIANT         vAddresses,
  BSTR            pRequestID,
  BSTR            pServerAddress,
  IMcastLeaseInfo **ppReleaseRequest
);

Parameters

LeaseStartTime

The start time of the lease.

LeaseStopTime

The stop time of the lease.

vAddresses

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

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

Pointer to a BSTR specifying the server address.

ppReleaseRequest

Pointer to the IMcastLeaseInfo interface created.

Return value

This method can return one of these 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.

TAPI calls the AddRef method on the IMcastLeaseInfo interface returned by IMcastAddressAllocation::CreateLeaseInfoFromVariant. The application must call Release on the IMcastLeaseInfo interface to free resources associated with it.

This function may send data over the wire in unencrypted form; therefore, someone eavesdropping on the network may be able to read the data. The security risk of sending the data in clear text should be considered before using this method.

Requirements

   
Target Platform Windows
Header mdhcp.h
Library Uuid.lib
DLL Mdhcp.dll

See also

IMcastAddressAllocation

IMcastLeaseInfo