VoipCallCoordinator.ReserveCallResourcesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ReserveCallResourcesAsync() |
Reserves the CPU and memory resources necessary for a VoIP call. You should use this method only in a single-process application model. |
ReserveCallResourcesAsync(String) |
Reserves the CPU and memory resources necessary for a VoIP call. You should use this method only in a two-process application model. |
ReserveCallResourcesAsync()
Reserves the CPU and memory resources necessary for a VoIP call. You should use this method only in a single-process application model.
public:
virtual IAsyncOperation<VoipPhoneCallResourceReservationStatus> ^ ReserveCallResourcesAsync() = ReserveCallResourcesAsync;
/// [Windows.Foundation.Metadata.Overload("ReserveOneProcessCallResourcesAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<VoipPhoneCallResourceReservationStatus> ReserveCallResourcesAsync();
[Windows.Foundation.Metadata.Overload("ReserveOneProcessCallResourcesAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<VoipPhoneCallResourceReservationStatus> ReserveCallResourcesAsync();
function reserveCallResourcesAsync()
Public Function ReserveCallResourcesAsync () As IAsyncOperation(Of VoipPhoneCallResourceReservationStatus)
Returns
The result of the reservation action.
- Attributes
Windows requirements
Device family |
Windows 10, version 1809 (introduced in 10.0.17763.0)
|
API contract |
Windows.ApplicationModel.Calls.CallsVoipContract (introduced in v4.0)
|
App capabilities |
oneProcessVoIP
phoneCallHistory
phoneCallHistorySystem
voipCall
|
Examples
You should call ReserveCallResourcesAsync only once for each call. Calling it a subsequent time for a new call while another call already exists results in an exception with an HRESULT of -2147024713 (0x800700b7), as shown in the code example.
...
try
{
status = await vCC.ReserveCallResourcesAsync();
}
catch (System.Exception ex)
{
if (ex.HResult == -2147024713)
{
Debug.WriteLine("CPU and memory resources have already been reserved for your application. Ignore the return value from your call to ReserveCallResourcesAsync, and proceed to handle a new VoIP call.");
}
}
...
Remarks
Use this method when your VoIP application receives an incoming call notification, or before creating an outgoing VoIP call.
Each call requires separate resources. To handle multiple VoIP calls simultaneously, you must invoke this method once for each call.
Resources are freed automatically when the last call is completed.
Applies to
ReserveCallResourcesAsync(String)
Reserves the CPU and memory resources necessary for a VoIP call. You should use this method only in a two-process application model.
public:
virtual IAsyncOperation<VoipPhoneCallResourceReservationStatus> ^ ReserveCallResourcesAsync(Platform::String ^ taskEntryPoint) = ReserveCallResourcesAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<VoipPhoneCallResourceReservationStatus> ReserveCallResourcesAsync(winrt::hstring const& taskEntryPoint);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<VoipPhoneCallResourceReservationStatus> ReserveCallResourcesAsync(string taskEntryPoint);
function reserveCallResourcesAsync(taskEntryPoint)
Public Function ReserveCallResourcesAsync (taskEntryPoint As String) As IAsyncOperation(Of VoipPhoneCallResourceReservationStatus)
Parameters
- taskEntryPoint
-
String
Platform::String
winrt::hstring
The name of an application-defined class that performs the work of a background task. For more information, see TaskEntryPoint.
Returns
The result of the reservation action.
- Attributes
Windows requirements
App capabilities |
phoneCallHistory
phoneCallHistorySystem
voipCall
|
Examples
You should call ReserveCallResourcesAsync only once for each call. Calling it a subsequent time for a new call while another call already exists results in an exception with an HRESULT of -2147024713 (0x800700b7), as shown in the code example.
...
try
{
status = await vCC.ReserveCallResourcesAsync(Current.RtcCallTaskName);
}
catch (System.Exception ex)
{
if (ex.HResult == -2147024713)
{
Debug.WriteLine("CPU and memory resources have already been reserved for your application. Ignore the return value from your call to ReserveCallResourcesAsync, and proceed to handle a new VoIP call.");
}
}
...
Remarks
Use this method when your VoIP application receives an incoming call notification, or before creating an outgoing VoIP call.
Each call requires separate resources. To handle multiple VoIP calls simultaneously, you must invoke this method once for each call.
Resources are freed automatically when the last call is completed.