다음을 통해 공유


ASYNC_COMPLETION (Compact 2013)

3/26/2014

This type is a callback function implemented by TAPI and supplied to the service provider as a parameter to the TSPI_providerInit function. The service provider calls this function to report the completion of a line or phone procedure that it executes asynchronously.

Syntax

ASYNC_COMPLETION Completion_Proc;
void(
  CALLBACK* Completion_Proc)(
  DRV_REQUESTID dwRequestID,
  LONG lResult
);

Parameters

  • dwRequestID
    The identifier passed in the original request that the service provider executed asynchronously.
  • lResult
    The outcome of the operation. Zero indicates success. A negative number indicates an error. The possible specific error values that can result from this function are the same for asynchronous and synchronous execution.

Return Value

None.

Remarks

The call state when calling this function can be any state.

This procedure is supplied by TAPI at the time a service provider is initialized with the TSPI_providerInit function. Some of the TSPI procedures that operate on line, call, and phone devices specify asynchronous operation. These procedures include a dwRequestID parameter to identify the request. When one of these TSPI procedures is called, the service provider can return a negative number for an error if one is detected immediately, or it can return the positive dwRequestID if the operation continues asynchronously.

The service provider must report completion exactly once for each request it executes asynchronously. It does so by calling the ASYNC_COMPLETION function. The service provider is not permitted to call this procedure or the LINEEVENT or PHONEEVENT procedure again until this procedure returns.

Requirements

Header

tspi.h

Library

CellTSP.dll

See Also

Reference

TSPI Callback Functions
TSPI_providerInit
LINEEVENT
PHONEEVENT