ITfSourceSingle::AdviseSingleSink method (msctf.h)

Installs an advise sink.

Syntax

HRESULT AdviseSingleSink(
  [in] TfClientId tid,
  [in] REFIID     riid,
  [in] IUnknown   *punk
);

Parameters

[in] tid

Contains a TfClientId value that identifies the client.

[in] riid

Identifies the type of advise sink to install.

This parameter can be one of the following values when the ITfSourceSingle object is obtained from an ITfThreadMgr object.

This parameter can be one of the following values when the ITfSourceSingle object is obtained from an ITfContext object.

Value Meaning
IID_ITfCleanupContextDurationSink
Installs a ITfCleanupContextDurationSink advise sink.
IID_ITfFunctionProvider
Registers the client as a function provider. The punk parameter is an ITfFunctionProvider interface pointer.

[in] punk

Pointer to the advise sink IUnknown pointer.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_INVALIDARG
One or more parameters are invalid.
CONNECT_E_CANNOTCONNECT
The advise sink cannot be installed.
CONNECT_E_ADVISELIMIT
The maximum number of advise sinks has been reached.
E_FAIL
An unspecified error occurred.
E_OUTOFMEMORY
A memory allocation failure occurred.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header msctf.h
DLL Msctf.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See also

ITfCleanupContextSink

ITfFunctionProvider

ITfSourceSingle