Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Determines the index of the closest matching completion set, given what has been typed so far.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'Declaration
Function GetBestMatch ( _
pszSoFar As String, _
iLength As Integer, _
<OutAttribute> ByRef piIndex As Integer, _
<OutAttribute> ByRef pdwFlags As UInteger _
) As Integer
int GetBestMatch(
string pszSoFar,
int iLength,
out int piIndex,
out uint pdwFlags
)
int GetBestMatch(
[InAttribute] String^ pszSoFar,
[InAttribute] int iLength,
[OutAttribute] int% piIndex,
[OutAttribute] unsigned int% pdwFlags
)
abstract GetBestMatch :
pszSoFar:string *
iLength:int *
piIndex:int byref *
pdwFlags:uint32 byref -> int
function GetBestMatch(
pszSoFar : String,
iLength : int,
piIndex : int,
pdwFlags : uint
) : int
Parameters
- pszSoFar
Type: System.String
[in] A string containing the text typed by the user.
- iLength
Type: System.Int32
[in] Integer containing the length of the string.
- piIndex
Type: System.Int32%
[out] Returns an integer specifying the index.
- pdwFlags
Type: System.UInt32%
[out] Returns the type of match completed. For a list of pdwFlags values, see UpdateCompletionFlags.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From textmgr.idl:
HRESULT IVsCompletionSet::GetBestMatch(
[in] const WCHAR *pszSoFar,
[in] long iLength,
[out] long *piIndex,
[out] DWORD *pdwFlags
);
Implement this method to determine the closest matching completion for a word given the text typed by the user. The view calls this method and passes in a string containing the text and the length of the string. In response to this call, return an index position into the completion set that identifies the best match, and a flag identifying the type of match performed.
The view calls this method only if CSF_CUSTOMMATCHING is specified in the completion set's flags.
If pdwFlags is set to either GBM_SELECT or GBM_UNIQUE, then the default matching in the view uses case-sensitive comparison.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.