Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
Contoh kode berikut menunjukkan transfer panggilan.
Sebelum menggunakan contoh kode ini, panggilan harus sedang berlangsung, dan Anda harus melakukan operasi di Melakukan Panggilan atau Menerima Panggilan.
Nota
Contoh ini tidak memiliki pemeriksaan kesalahan dan rilis yang sesuai untuk kode produksi.
// From elsewhere in your code, you have obtained pAddress and pBasicCall,
// which are pointers to the ITAddress and ITBasicCallControl interfaces
// of the call in progress that will be transferred.
// Create the call object for transfer. bstrAddressToCall and dwAddressType
// have been retrieved from a UI.
ITBasicCallControl * pConsultCall
HRESULT hr = pAddress->CreateCall(
bstrAddressToCall,
dwAddressType,
&pConsultCall
);
// If ( hr != S_OK ) process the error here.
// Start the transfer.
hr = pBasicCall->Transfer(
pConsultCall,
VARIANT_TRUE
);
// If ( hr != S_OK ) process the error here.
// Depending on the service provider, additional operations may be available
// or required.
// Finish the transfer.
hr = pConsultCall->Finish(FM_ASTRANSFER);
// If ( hr != S_OK ) process the error here.
// The consultation call transitions to CS_DISCONNECTED.
// The objects associated with pConsultCall and pBasicCall can be released immediately or
// used for information purposes and released later.
Topik terkait