ShutdownTextServices function (textserv.h)

Disconnects a host from a text services instance.

Syntax

HRESULT ShutdownTextServices(
  [in] IUnknown *pTextServices
);

Parameters

[in] pTextServices

Type: IUnknown*

A text services instance created by a previous call to the CreateTextServices function.

Return value

Type: HRESULT

If the text services object was created successfully, the return value is S_OK.

If the function fails, one of the following COM error codes are returned. For more information on COM error codes, see Error Handling in COM.

Return code Description
E_INVALIDARG
The pTextServices parameter is not valid.

Remarks

A host calls this function when the host is being freed. Calling this function is necessary because all text services instances maintain a host pointer for which the AddRef method has not been called. This function calls the Release method on the text services instance and, if this is not the last reference to the text services object, nulls out the host pointer in the text services object and prepares the control to handle failed operations that require host services. This function allows any other outstanding references to the text services object to work or fail gracefully depending on the service required.

Requirements

Requirement Value
Target Platform Windows
Header textserv.h
DLL Msftedit.dll

See also

CreateTextServices