Compartilhar via


IVsLibraryMgr.GetNameAt Method

Returns the displayable name for the requested library.

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

Syntax

'Declaration
Function GetNameAt ( _
    nLibIndex As UInteger, _
    pszName As IntPtr _
) As Integer
int GetNameAt(
    uint nLibIndex,
    IntPtr pszName
)
int GetNameAt(
    [InAttribute] unsigned int nLibIndex, 
    [InAttribute] IntPtr pszName
)
abstract GetNameAt : 
        nLibIndex:uint32 * 
        pszName:IntPtr -> int
function GetNameAt(
    nLibIndex : uint, 
    pszName : IntPtr
) : int

Parameters

  • nLibIndex
    Type: UInt32

    [in] Specifies the zero-based index of the library of interest.

  • pszName
    Type: IntPtr

    [out] Pointer to a null-terminated string containing the library name.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsLibraryMgr::GetNameAt(
   [in] ULONG nLibIndex,
   [out, retval] WCHAR **pszName
);

Return a pointer to a null-terminated string containing the displayable name for the designated library. You must allocate the string buffer and keep it valid until the next call to your library manager's GetNameAt method.

Note

The text buffer is created by the IVsLibraryMgr object and the buffer must persist for the life of the IVsLibraryMgr object.

If you are implementing this interface in managed code and you need to have the string disposed of by the caller, implement the IVsCoTaskMemFreeMyStrings interface on the IVsLibraryMgr interface.

.NET Framework Security

See Also

Reference

IVsLibraryMgr Interface

Microsoft.VisualStudio.Shell.Interop Namespace