Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This type is a callback function implemented by TAPI and supplied to the service provider as a parameter to the TSPI_providerInitfunction. 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_providerInitfunction. 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 dwRequestIDif 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_COMPLETIONfunction. The service provider is not permitted to call this procedure or the LINEEVENTor PHONEEVENTprocedure again until this procedure returns.

Requirements

Header tapicomn.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also