Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
TSF Reference
TSF Interfaces
ITfSource
 ITfSource::AdviseSink Method
ITfSource::AdviseSink Method

Syntax

HRESULT AdviseSink(
  [in]   REFIID riid,
  [in]   IUnknown *punk,
  [out]  DWORD *pdwCookie
);

Parameters

riid [in]

Identifies the type of advise sink to install.

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

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

ValueMeaning
IID_ITfActiveLanguageProfileNotifySink

Installs an ITfActiveLanguageProfileNotifySink advise sink.

IID_ITfDisplayAttributeNotifySink

Installs an ITfDisplayAttributeNotifySink advise sink.

IID_ITfKeyTraceEventSink

Installs an ITfKeyTraceEventSink advise sink.

IID_ITfPreservedKeyNotifySink

Installs an ITfPreservedKeyNotifySink advise sink.

IID_ITfThreadFocusSink

Installs an ITfThreadFocusSink advise sink.

IID_ITfThreadMgrEventSink

Installs an ITfThreadMgrEventSink advise sink.

 

punk [in]

The advise sink IUnknown pointer.

pdwCookie [out]

Address of a DWORD value that receives an identifying cookie. This value is used to uninstall the advise sink in a subsequent call to ITfSource::UnadviseSink. Receives (DWORD)-1 if a failure occurs.

Return Value

The method can return one of the following values.

ValueDescription
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

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
RedistributableTSF 1.0 onWindows NT 4.0,Windows 2000 ProfessionalandWindows MeWindows 98
HeaderMsctf.idl and Msctf.h
DLLMsctf.dll

See Also

ITfSource
ITfThreadMgr
ITfContext
ITfCompartment
ITfDisplayAttributeNotifySink
ITfActiveLanguageProfileNotifySink
ITfThreadFocusSink
ITfPreservedKeyNotifySink
ITfThreadMgrEventSink
ITfKeyTraceEventSink
ITfSource::UnadviseSink
ITfContextKeyEventSink
ITfEditTransactionSink
ITfStatusSink
ITfTextEditSink
ITfTextLayoutSink
ITfCompartmentEventSink
ITfInputProcessorProfiles
ITfLanguageProfileNotifySink
ITfLangBarItem
ITfLangBarItemSink
ITfSystemLangBarItemSink

Send comments about this topic to Microsoft

Build date: 7/14/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker