Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ITextStoreAnchor::AdviseSink method

The ITextStoreAnchor::AdviseSink method installs a new advise sink from the ITextStoreAnchorSink interface or modifies an existing advise sink.

Syntax


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

Parameters

riid [in]

Specifies the sink interface. The only supported value is IID_ITextStoreAnchorSink.

punk [in]

Pointer to the sink interface to advise. Cannot be NULL.

dwMask [in]

Specifies the events that notify the advise sink. For more information about possible parameter values, see TS_AS_* Constants.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

E_FAIL

The specified sink interface riid could not be obtained.

E_INVALIDARG

The specified sink interface is unsupported.

E_UNEXPECTED

The specified sink object could not be obtained.

 

Remarks

Subsequent calls with the same interface, represented by the punk parameter, are handled as requests to update the dwMask parameter. Servers should not call the AddRef method on the sink in response to such a request.

Servers only maintain a single connection point. Attempts to advise a second sink object fail until the original sink object is removed. Applications should use the ITextStoreAnchor::UnadviseSink method to unregister the sink object when notifications are not required.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Textstor.h

IDL

Textstor.idl

DLL

Msctf.dll

See also

TS_AS_* Constants
ITextStoreAnchor::UnadviseSink
ITextStoreAnchor

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.