Udostępnij za pośrednictwem


Metoda IVsSolution.CloseSolutionElement — (UInt32, IVsHierarchy, UInt32)

 

Zamyka programowo dokumentu, projektu lub całego rozwiązania.

Przestrzeń nazw:   Microsoft.VisualStudio.Shell.Interop
Zestaw:  Microsoft.VisualStudio.Shell.Interop (w Microsoft.VisualStudio.Shell.Interop.dll)

Składnia

int CloseSolutionElement(
    uint grfCloseOpts,
    IVsHierarchy pHier,
    uint docCookie
)
int CloseSolutionElement(
    unsigned int grfCloseOpts,
    IVsHierarchy^ pHier,
    unsigned int docCookie
)
abstract CloseSolutionElement : 
        grfCloseOpts:uint32 *
        pHier:IVsHierarchy *
        docCookie:uint32 -> int
Function CloseSolutionElement (
    grfCloseOpts As UInteger,
    pHier As IVsHierarchy,
    docCookie As UInteger
) As Integer

Parametry

  • docCookie
    Type: System.UInt32

    [in] Dokument, który został zamknięty. Ta wartość jest zwracana z tabeli dokumentu uruchomione przez wywołanie metody GetDocumentInfo.

Wartość zwracana

Type: System.Int32

Jeśli metoda zakończy się pomyślnie, zwraca S_OK. Jeśli nie, zwraca kod błędu.

Uwagi

Podpis COM

Z vsshell.idl:

HRESULT IVsSolution::CloseSolutionElement(
   [in] VSSLNCLOSEOPTIONS grfCloseOpts,
   [in] IVsHierarchy *pHier,
   [in] VSCOOKIE docCookie
);

Aby zamknąć całego rozwiązania, należy wywołać CloseSolutionElement(grfCloseOpts, null, null). Aby zamknąć pojedynczego projektu, należy wywołać CloseSolutionElement(grfCloseOpts, phier, null). Aby zamknąć pojedynczego dokumentu, należy wywołać CloseSolutionElement(grfCloseOpts, null, docCookie).

Zobacz też

Interfejs IVsSolution
Przestrzeń nazw Microsoft.VisualStudio.Shell.Interop

Powrót do początku