Share via


IVsResourceManager2.AnnotateIDIfNecessary Method

Creates an annotated resource ID.

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

Syntax

'Declaration
Function AnnotateIDIfNecessary ( _
    szId As String, _
    ByRef guidPackage As Guid, _
    szDllPath As String, _
    <OutAttribute> ByRef pbstrAnnotatedId As String _
) As Integer
int AnnotateIDIfNecessary(
    string szId,
    ref Guid guidPackage,
    string szDllPath,
    out string pbstrAnnotatedId
)
int AnnotateIDIfNecessary(
    [InAttribute] String^ szId, 
    [InAttribute] Guid% guidPackage, 
    [InAttribute] String^ szDllPath, 
    [OutAttribute] String^% pbstrAnnotatedId
)
abstract AnnotateIDIfNecessary : 
        szId:string * 
        guidPackage:Guid byref * 
        szDllPath:string * 
        pbstrAnnotatedId:string byref -> int
function AnnotateIDIfNecessary(
    szId : String, 
    guidPackage : Guid, 
    szDllPath : String, 
    pbstrAnnotatedId : String
) : int

Parameters

  • guidPackage
    Type: System.Guid%

    [in] The GUID of the resource package.

  • szDllPath
    Type: System.String

    [in] The path to the resource in the DLL.

  • pbstrAnnotatedId
    Type: System.String%

    [out] An ID string with the correct annotations.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

If szId is not a resource ID or a resource ID that already has an embedded package GUID or DLL path, bstrAnnotatedId is set equal to szId. Otherwise, if guidPackage is not null, it is appended to szId and the result is copied to bstrAnnotatedId. Otherwise, if szDllPath is not null, it is appended to szId and the result is copied to bstrAnnotatedId. For example:

szId

guidPackage

szDllPath

*pbstrAnnotatedId

"test"

<anything>

<anything>

"test"

"@test"

GUID_NULL

""

"@test"

"@test"

{F1DE2D75-3B95-4510-9B2B-565BC0E38877}

""

"@test;{F1DE2D75-3B95-4510-9B2B-565BC0E38877}"

"@test"

GUID_NULL

"..\bin\%lcid%\PackageUI.dll"

"@test;..\bin\%lcid%\PackageUI.dll"

.NET Framework Security

See Also

Reference

IVsResourceManager2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace