TSPI_providerShutdown

The TSPI_providerShutdown function shuts down the service provider. The service provider terminates any activities it has in progress and releases any resources it has allocated.

LONG TSPI_providerShutdown(
  DWORD dwTSPIVersion,         
  DWORD dwPermanentProviderID  
);
 

Parameters

dwTSPIVersion
The version of the TSPI definition under which this function must operate. The caller can use TSPI_lineNegotiateTSPIVersion or TSPI_phoneNegotiateTSPIVersion with the special dwDeviceID INITIALIZE_NEGOTIATION to negotiate a version that is guaranteed to be acceptible to the service provider.
dwPermanentProviderID
This parameter allows the service provider to determine which among multiple possible instances of the service provider is being shut down. The value of the parameter is identical to that passed in the parameter of the same name in TSPI_providerInit.

Return Values

Returns zero if the function succeeds, or an error number if an error occurs. Possible return values are as follows:

LINEERR_INCOMPATIBLEAPIVERSION, LINEERR_NOMEM.

Remarks

The final paired call to this function must be the last call to any of the TSPI functions prefixed with TSPI_line or TSPI_phone other than TSPI_lineNegotiateTSPIVersion, or TSPI_phoneNegotiateTSPIVersion. It is the caller's responsibility to ensure this.

This function should always succeed except in extraordinary circumstances. Most callers will probably ignore the return code because they will be unable to compensate for any error that occurs. The specified return values are more advisory for development diagnostic purposes than anything else.

There is no directly corresponding function in TAPI. In TAPI, multiple different usage instances can be outstanding, with an "application handle" parameter to identify the instance to be operated on. In TSPI, the interface architecture supports only a single usage instance for each distinct service provider.

See Also

TSPI_lineNegotiateTSPIVersion, TSPI_phoneNegotiateTSPIVersion, TSPI_providerInit