IVsLibraryMgr::GetNameAt Method (UInt32, IntPtr)

 

Returns the displayable name for the requested library.

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

int GetNameAt(
	unsigned int nLibIndex,
	IntPtr pszName
)

Parameters

nLibIndex
Type: System::UInt32

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

pszName
Type: System::IntPtr

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

Return Value

Type: System::Int32

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

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.

System_CAPS_noteNote

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.

Return to top
Show: