IVsCompletionSetEx.CompareItems 方法

比较两个 completor 项目。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop.8.0(在 Microsoft.VisualStudio.TextManager.Interop.8.0.dll 中)

语法

声明
Function CompareItems ( _
    bstrSoFar As String, _
    bstrOther As String, _
    lCharactersToCompare As Integer, _
    <OutAttribute> ByRef pLResult As Integer _
) As Integer
int CompareItems(
    string bstrSoFar,
    string bstrOther,
    int lCharactersToCompare,
    out int pLResult
)
int CompareItems(
    [InAttribute] String^ bstrSoFar, 
    [InAttribute] String^ bstrOther, 
    [InAttribute] int lCharactersToCompare, 
    [OutAttribute] int% pLResult
)
abstract CompareItems : 
        bstrSoFar:string * 
        bstrOther:string * 
        lCharactersToCompare:int * 
        pLResult:int byref -> int
function CompareItems(
    bstrSoFar : String, 
    bstrOther : String, 
    lCharactersToCompare : int, 
    pLResult : int
) : int

参数

  • bstrSoFar
    类型:String

    [in] 比较的第一个字符串。

  • bstrOther
    类型:String

    [in] 比较的第二个字符串与第一个字符串。

  • lCharactersToCompare
    类型:Int32

    [in] 比较的字符数。

  • pLResult
    类型:Int32%

    [out] 控件结果。

返回值

类型:Int32
如果方法成功,则返回; S_OK否则, (在使用默认比较) 情况下,返回错误代码。

备注

COM 签名

从 textmgr2.idl:

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

此方法提供一种查找完成的匹配项列表的特定语言的方式。 比较两个更完整的项第 1 lCharactersToCompare 字符并将 plResult 参数为以下条件之一:

value

含义

plResultAMP_LT 0

bstrSoFar 在 bstrOther之前

plResult == 0

bstrSoFar 与 bstrOther 相等

plResult AMP_GT 0

bstrSoFar 在 bstrOtherbstrOther

.NET Framework 安全性

请参阅

参考

IVsCompletionSetEx 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间