共用方式為


IVsToolbox3.GetItemID Method

Gets the unique ID of a item.

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

Syntax

'宣告
Function GetItemID ( _
    pDO As IDataObject, _
    <OutAttribute> ByRef pbstrID As String _
) As Integer
'用途
Dim instance As IVsToolbox3
Dim pDO As IDataObject
Dim pbstrID As String
Dim returnValue As Integer

returnValue = instance.GetItemID(pDO, _
    pbstrID)
int GetItemID(
    IDataObject pDO,
    out string pbstrID
)
int GetItemID(
    [InAttribute] IDataObject^ pDO, 
    [OutAttribute] String^% pbstrID
)
abstract GetItemID : 
        pDO:IDataObject * 
        pbstrID:string byref -> int 
function GetItemID(
    pDO : IDataObject, 
    pbstrID : String
) : int

Parameters

  • pbstrID
    Type: System.String%
    The ID of the item. If the item is found, but has no ID then this values is nulla null reference (Nothing in Visual Basic).

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 vsshell80.idl:

HRESULT GetItemID(
   [in] IDataObject* pDO,
   [out] BSTR* pbstrID
);

.NET Framework Security

See Also

Reference

IVsToolbox3 Interface

IVsToolbox3 Members

Microsoft.VisualStudio.Shell.Interop Namespace