次の方法で共有


IVsCfgProvider2.GetCfgNames Method

Returns one or more configuration names.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'宣言
Function GetCfgNames ( _
    celt As UInteger, _
    <OutAttribute> rgbstr As String(), _
    <OutAttribute> pcActual As UInteger() _
) As Integer
'使用
Dim instance As IVsCfgProvider2
Dim celt As UInteger
Dim rgbstr As String()
Dim pcActual As UInteger()
Dim returnValue As Integer

returnValue = instance.GetCfgNames(celt, _
    rgbstr, pcActual)
int GetCfgNames(
    uint celt,
    string[] rgbstr,
    uint[] pcActual
)
int GetCfgNames(
    [InAttribute] unsigned int celt, 
    [OutAttribute] array<String^>^ rgbstr, 
    [OutAttribute] array<unsigned int>^ pcActual
)
function GetCfgNames(
    celt : uint, 
    rgbstr : String[], 
    pcActual : uint[]
) : int

Parameters

  • celt
    Type: System.UInt32

    [in] Specifies the requested number of property names. If this number is unknown, celt can be zero.

  • rgbstr
    Type: []

    [in, out, size_is(celt)] On input, an allocated array to hold the number of configuration property names specified by celt. This parameter can also be a null reference (Nothing in Visual Basic) if the celt parameter is zero. On output, rgbstr contains configuration property names.

  • pcActual
    Type: []

    [out, optional] Pointer to a count of the actual number of property names returned.

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 vsshell.idl:

HRESULT IVsCfgProvider2::GetCfgNames(
   [in] ULONG celt,
   [in, out, size_is(celt)] BSTR rgbstr[],
   [out, optional] ULONG *pcActual
);

Typically two calls are made to GetCfgNames. With the first call, celt is set to zero, rgbstr to a null reference (Nothing in Visual Basic), and pcActual to a valid address. GetCfgNames returns with pcActual pointing to the number of property names available. The caller uses this information to allocate rgbstr to the appropriate size and call GetCfgNames a second time with celt set to the contents of pcActual.

Permissions

See Also

Reference

IVsCfgProvider2 Interface

IVsCfgProvider2 Members

Microsoft.VisualStudio.Shell.Interop Namespace