IVsCompletionSetEx::CompareItems Method (String^, String^, Int32, Int32)

 

Compares two completor items.

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

int CompareItems(
	String^ bstrSoFar,
	String^ bstrOther,
	int lCharactersToCompare,
	[OutAttribute] int% pLResult
)

Parameters

bstrSoFar
Type: System::String^

[in] First string to compare to.

bstrOther
Type: System::String^

[in] Second string to compare to first string.

lCharactersToCompare
Type: System::Int32

[in] Number of characters to compare.

pLResult
Type: System::Int32

[out] Result of comparison.

Return Value

Type: System::Int32

If the method is successful, returns S_OK; otherwise, returns an error code (in which case the default comparison is used).

From textmgr2.idl:

HRESULT IVsCompletionSetEx::CompareItems(
   [in]const BSTR bstrSoFar,
   [in]const BSTR bstrOther,
   [in]long lCharactersToCompare,
   [out]long* plResult
);

This method provides a way to find a matching item in the completion list in a language-specific way. Compare the 1st lCharactersToCompare characters of two completer items and set the plResult parameter to one of the following conditions:

value

Meaning

plResult< 0

bstrSoFar comes before bstrOther

plResult == 0

bstrSoFar is equivalent to bstrOther

plResult > 0

bstrSoFar comes after bstrOther

Return to top
Show: