HRESULT CreateContext( [in] TfClientId tidOwner, [in] DWORD dwFlags, [in] IUnknown *punk, [out] ITfContext **ppic, [out] TfEditCookie *pecTextStore );
The client identifier. For an application, this value is provided by a previous call to ITfThreadMgr::Activate. For a text service, this value is provided in the text service ITfTextInputProcessor::Activate method.
Reserved, must be zero.
Pointer to an object that supports the ITextStoreACP or ITfContextOwnerCompositionSink interfaces. This value can be NULL.
Address of an ITfContext pointer that receives the context.
Pointer to a TfEditCookie value that receives an edit cookie for the new context. This value identifies the context in various methods.
The method can return one of the following values.
The method was successful.
One or more parameters are invalid.
A memory allocation error occurred.
An unspecified error occurred.
All references to the punk parameter are released when the context is destroyed or when the context is removed from the stack with the ITfDocumentMgr::Pop method.
Send comments about this topic to Microsoft
Build date: 7/14/2009