IVsExpansionSession::GetFieldSpan Method (String^, array<TextSpan>^)

 

Retrieves the span (the position and extent) of the specified field.

Namespace:   Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

int GetFieldSpan(
	String^ bstrField,
	array<TextSpan>^ ptsSpan
)

Parameters

bstrField
Type: System::String^

[in] The name of the field.

ptsSpan
Type: array<Microsoft.VisualStudio.TextManager.Interop::TextSpan>^

[out] The span of the field.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From textmgr2.idl:

HRESULT IVsExpansionSession::GetFieldSpan(
   [in] BSTR bstrField,
   [out]TextSpan *ptsSpan
);

The span of the field is the location of the field in the source buffer after the code snippet has been inserted and formatted. This method is typically called to retrieve the span of a field to highlight the field during the special edit mode.

Return to top
Show: