ITfContext::RequestEditSession method
Syntax
HRESULT RequestEditSession( [in] TfClientId tid, [in] ITfEditSession *pes, [in] DWORD dwFlags, [out] HRESULT *phrSession );
Parameters
- tid [in]
-
Contains a TfClientId value that identifies the client to establish the edit session with.
- pes [in]
-
Pointer to an ITfEditSession interface called to perform the edit session.
- dwFlags [in]
-
Contains one or more of the following values.
- phrSession [out]
-
Address of an HRESULT value that receives the result of the edit session request. The value received depends upon the type of edit session requested.
- If an asynchronous edit session is requested and can be established, receives TF_S_ASYNC.
- If a synchronous edit session is requested and cannot be established, receives TF_E_SYNCHRONOUS.
- If the TF_ES_READWRITE flag is specified and the document is read-only, receives TS_E_READONLY.
- If a synchronous edit session is established, receives the return value of the ITfEditSession::DoEditSession.
Return value
This method can return one of these values.
| Value | Description |
|---|---|
|
The method was successful. phrSession contains more result data for the method. |
|
The caller is within the context of another text service which already holds a lock. |
|
The context is not on a document stack. |
|
One or more parameters are invalid. |
|
A memory allocation failure occurred. |
Remarks
Pending asynchronous edit sessions are processed in the order received. Synchronous edit sessions are processed before any pending asynchronous edit sessions.
A text service can request an edit session within the context of an existing edit session, provided a write access session is not requested within a read-only session. Calls to this method within the context of an edit session established by another text service will fail with TF_E_LOCKED.
A synchronous read/write request will fail if made when processing one of the following notifications.
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 |
|
|
IDL |
|
|
DLL |
|
See also
- ITfContext
- ITfEditSession
- ITfTextEditSink::OnEndEdit
- ITfTextLayoutSink::OnLayoutChange
- ITfStatusSink::OnStatusChange