Método IVsMonitorSelection.GetCurrentSelection (IntPtr, UInt32, IVsMultiItemSelect, IntPtr)

 

Retorna a hierarquia do projeto atual, o item de projeto e o contêiner de seleção para a seleção atual.

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

Sintaxe

int GetCurrentSelection(
    out IntPtr ppHier,
    out uint pitemid,
    out IVsMultiItemSelect ppMIS,
    out IntPtr ppSC
)
int GetCurrentSelection(
    [OutAttribute] IntPtr% ppHier,
    [OutAttribute] unsigned int% pitemid,
    [OutAttribute] IVsMultiItemSelect^% ppMIS,
    [OutAttribute] IntPtr% ppSC
)
abstract GetCurrentSelection : 
        ppHier:nativeint byref *
        pitemid:uint32 byref *
        ppMIS:IVsMultiItemSelect byref *
        ppSC:nativeint byref -> int
Function GetCurrentSelection (
    <OutAttribute> ByRef ppHier As IntPtr,
    <OutAttribute> ByRef pitemid As UInteger,
    <OutAttribute> ByRef ppMIS As IVsMultiItemSelect,
    <OutAttribute> ByRef ppSC As IntPtr
) As Integer

Parâmetros

  • ppHier
    [out] Ponteiro para o IVsHierarchy interface de hierarquia do projeto atual se a seleção pertence a uma única hierarquia.Se a seleção pertencer a várias hierarquias, ppHier for definido como null.
  • pitemid
    [out] Ponteiro para o identificador para o item de projeto atual.Se pitemid for definido como VSITEMID_SELECTION, a seleção atual envolve vários itens.Esses itens podem ser acessados usando o IVsMultiItemSelect interface apontada por ppMIS.
  • ppMIS
    [out] Ponteiro para o IVsMultiItemSelect interface a ser usada para acessar uma seleção múltipla.
  • ppSC
    [out] Ponteiro para o ISelectionContainer interface a ser usado para acessar os dados para a janela Propriedades.

Valor de retorno

Type: System.Int32

Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

COM assinatura

De vsshell.idl:

HRESULT IVsMonitorSelection::GetCurrentSelection(
   [out] IVsHierarchy        **ppHier,
   [out] VSITEMID             *pitemid,
   [out] IVsMultiItemSelect  **ppMIS,
   [out] ISelectionContainer **ppSC
);

Consulte também

Interface IVsMonitorSelection
Namespace Microsoft.VisualStudio.Shell.Interop

Retornar ao topo