Platform SDK: TAPI

ITAddress::CreateCall

Creates a new Call object that can be used to make an outgoing call and returns a pointer to the object's ITBasicCallControl interface. The newly created call is in the CS_IDLE state and has no media or terminals selected.

Acceptable input values for call address, address type, and media types are specific to the telephony service provider that supports the current address. For information on TSPs shipped with Windows 2000, see About The Telephony Service Provider (TSP). For third party TSPs, see the documentation provided by the vender.

HRESULT CreateCall(
  BSTR pDestAddress,
  long lAddressType,
  long lMediaTypes,
  ITBasicCallControl **ppCall
);

Parameters

pDestAddress
[in] This BSTR string contains a destination address. The format is provider-specific. This pointer can be NULL for non-dialed addresses (such as with a hot phone) or when all dialing is performed using ITBasicCallControl::Dial. NULL in combination with a NULL pGroupID in ITBasicCallControl::Pickup results in a group pickup. Service providers that have inverse multiplexing capabilities can allow an application to specify multiple addresses at once.
lAddressType
[in] Contains an address type constant, such as LINEADDRESSTYPE_PHONENUMBER, which describes the format of the address. The value must be valid for this address. Use ITAddressCapabilities::get_AddressCapability with AddressCap set to AC_ADDRESSTYPES to verify the value.
lMediaTypes
[in] Identifies the media type or types that will be involved in the call session.
ppCall
[out, retval] Pointer to ITBasicCallControl interface.

Return Values

Value Meaning
S_OK Method succeeded.
E_INVALIDARG The address type, lAddressType, is invalid or specifies more than one address type.
E_OUTOFMEMORY Insufficient memory exists to perform the operation.
E_POINTER The ppCall parameter is not a valid pointer.

Remarks

The application must use SysAllocString to allocate memory for the pDestAddress parameter and use SysFreeString to free the memory when the variable is no longer needed.

Calls used as consultation calls, such as during a conference, transfer, or forward operation, must be created using this method.

Note for TAPI 2 programmers  This method is not precisely the same as lineMakeCall. It supplies TAPI with much of the same information, but parallel operations are not performed until ITBasicCallControl::Connect is called.

Requirements

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

See Also

ITAddress, Address Object, ITBasicCallControl::Dial, lineDial