Skip to content

Latest commit

 

History

History
95 lines (72 loc) · 4.17 KB

nc-tspi-async_completion.md

File metadata and controls

95 lines (72 loc) · 4.17 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NC:tspi.ASYNC_COMPLETION
ASYNC_COMPLETION (tspi.h)
Completion_Proc is a callback function implemented by TAPI and supplied to the service provider as a parameter to TSPI_providerInit.
ASYNC_COMPLETION
ASYNC_COMPLETION callback
CompletionProc
CompletionProc callback function [TAPI 2.2]
_tspi_async_completion
tspi.async_completion
tspi.completion_proc
tspi/CompletionProc
tspi\completion_proc.htm
tapi3
673c9d23-e380-49f7-bd06-23552634d5b9
12/05/2018
ASYNC_COMPLETION, ASYNC_COMPLETION callback, CompletionProc, CompletionProc callback function [TAPI 2.2], _tspi_async_completion, tspi.async_completion, tspi.completion_proc, tspi/CompletionProc
tspi.h
Windows
Windows
19H1
ASYNC_COMPLETION
tspi/ASYNC_COMPLETION
c++
APIRef
kbSyntax
UserDefined
Tspi.h
CompletionProc

ASYNC_COMPLETION callback function

-description

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

The ASYNC_COMPLETION type defines a pointer to this callback function. Completion_Proc is a placeholder for the application-defined function name.

-parameters

-param dwRequestID

The identifier passed in the original request that the service provider executed asynchronously.

-param lResult

The outcome of the operation. This can be zero to indicate success or a negative number to indicate an error. The possible specific error values that can result from a function are the same for asynchronous or synchronous execution.

-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 such a procedure is called, the service provider can return a negative number for an error if one is detected immediately, or 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 this procedure. The service provider is not permitted to call this procedure or the Line_Event or Phone_Event procedure again until this procedure returns.

The service provider is permitted to call the Completion_Proc function before it returns from the first request. TAPI guarantees not to call the service provider from within the Completion_Proc context except where noted.

This does not have any direct correspondence at the TAPI level because at that level asynchronous function completions are reported as a message passed through the same callback interface that is used for spontaneous event messages. At the TSPI level, spontaneous events are reported through the Line_Event and Phone_Event callback procedures.

-see-also

Line_Event

Phone_Event

TSPI_providerInit