Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual Studio SDK
IVsShell Interface
IVsShell Methods
 IsPackageInstalled Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio SDK
IVsShell..::.IsPackageInstalled Method

Updated: November 2007

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)

Visual Basic (Declaration)
Function IsPackageInstalled ( _
    ByRef guidPackage As Guid, _
    <OutAttribute> ByRef pfInstalled As Integer _
) As Integer
Visual Basic (Usage)
Dim instance As IVsShell
Dim guidPackage As Guid
Dim pfInstalled As Integer
Dim returnValue As Integer

returnValue = instance.IsPackageInstalled(guidPackage, _
    pfInstalled)
C#
int IsPackageInstalled(
    ref Guid guidPackage,
    out int pfInstalled
)
Visual C++
int IsPackageInstalled(
    [InAttribute] Guid% guidPackage, 
    [OutAttribute] int% pfInstalled
)
JScript
function IsPackageInstalled(
    guidPackage : Guid, 
    pfInstalled : int
) : int

Parameters

guidPackage
Type: System..::.Guid%

[in] Unique identifier of the VSPackage.

pfInstalled
Type: System..::.Int32%

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

Return Value

Type: System..::.Int32

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

COM Signature

From vsshell.idl:

Visual C++
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.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker