다음을 통해 공유


ASYNC_COMPLETION (Windows Embedded CE 6.0)

1/6/2010

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 tapicomn.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

TSPI Callback Functions
TSPI_providerInit
LINEEVENT
PHONEEVENT