ITfLangBarItemMgr::AdviseItemSink method (ctfutb.h)

Installs a language bar item event sink for a language bar item.

Syntax

HRESULT AdviseItemSink(
  [in]  ITfLangBarItemSink *punk,
  [out] DWORD              *pdwCookie,
  [in]  REFGUID            rguidItem
);

Parameters

[in] punk

Pointer to the ITfLangBarItemSink object to install.

[out] pdwCookie

Pointer to a DWORD that receives an advise sink identification cookie. This cookie identifies the advise sink when it is removed with the ITfLangBarItemMgr::UnadviseItemSink or ITfLangBarItemMgr::UnadviseItemsSink method.

[in] rguidItem

Contains the GUID that identifies the item to install the advise sink for. This is the item GUID that the item supplies in ITfLangBarItem::GetInfo. This can be a custom value or one of the predefined language bar items.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_FAIL
An unspecified error occurred.
E_INVALIDARG
rguidItem is invalid.
E_OUTOFMEMORY
A memory allocation failure occurred.
E_POINTER
punk and/or pdwCookie is invalid.

Requirements

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

See also

ITfLangBarItem::GetInfo

ITfLangBarItemMgr

ITfLangBarItemMgr::UnadviseItemSink

ITfLangBarItemMgr::UnadviseItemsSink

ITfLangBarItemSink

Predefined language bar items