IVsInstalledProduct.ProductID Method

Obtains a pointer to the string containing the ID of the product that is displayed in the About dialog box on the Help menu. Not called for the splash screen.

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

Syntax

'宣言
Function ProductID ( _
    <OutAttribute> ByRef pbstrPID As String _
) As Integer
'使用
Dim instance As IVsInstalledProduct
Dim pbstrPID As String
Dim returnValue As Integer

returnValue = instance.ProductID(pbstrPID)
int ProductID(
    out string pbstrPID
)
int ProductID(
    [OutAttribute] String^% pbstrPID
)
function ProductID(
    pbstrPID : String
) : int

Parameters

  • pbstrPID
    Type: System.String%

    [out] Pointer to the string that identifies the product ID.

Return Value

Type: System.Int32

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsInstalledProduct::ProductID(
   [out, retval] BSTR *pbstrPID
);

IVsInstalledProduct.ProductID gets the number that is displayed in the Installed Products section of About dialog box. Generally, this method is used to show a product identifier that the customer can use when communicating with the client's product support services.

Examples

You can place the hard-coded paths and strings used by this method in your project's resource file. For example, in the Figures Sample, the following path to the product ID is in the resource file.

IDS_PRODUCTID "Unknown Product ID"

Permissions

See Also

Reference

IVsInstalledProduct Interface

IVsInstalledProduct Members

Microsoft.VisualStudio.Shell.Interop Namespace