Delen via


IVsShell.IsPackageInstalled Method

Determines whether a VSPackage identified by guidPackage is installed and registered with the system.

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

Syntax

'Declaration
Function IsPackageInstalled ( _
    ByRef guidPackage As Guid, _
    <OutAttribute> ByRef pfInstalled As Integer _
) As Integer
int IsPackageInstalled(
    ref Guid guidPackage,
    out int pfInstalled
)
int IsPackageInstalled(
    [InAttribute] Guid% guidPackage, 
    [OutAttribute] int% pfInstalled
)
abstract IsPackageInstalled : 
        guidPackage:Guid byref * 
        pfInstalled:int byref -> int
function IsPackageInstalled(
    guidPackage : Guid, 
    pfInstalled : int
) : int

Parameters

  • guidPackage
    Type: Guid%

    [in] Unique identifier of the VSPackage.

  • pfInstalled
    Type: Int32%

    [out, retval] true if the VSPackage is installed in the registry.

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 IVsShell::IsPackageInstalled(
   [in] REFGUID guidPackage,
   [out, retval] BOOL *pfInstalled
);

This method can be used to achieve advanced interactions between multiple VSPackages to determine whether they are loaded. It is recommended that you query for services that other VSPackages proffer.

.NET Framework Security

See Also

Reference

IVsShell Interface

Microsoft.VisualStudio.Shell.Interop Namespace