IVsResourceManager2.AnnotateIDIfNecessary Method

Definition

Creates an annotated resource ID.

public:
 int AnnotateIDIfNecessary(System::String ^ szId, Guid % guidPackage, System::String ^ szDllPath, [Runtime::InteropServices::Out] System::String ^ % pbstrAnnotatedId);
public int AnnotateIDIfNecessary (string szId, ref Guid guidPackage, string szDllPath, out string pbstrAnnotatedId);
abstract member AnnotateIDIfNecessary : string * Guid * string * string -> int
Public Function AnnotateIDIfNecessary (szId As String, ByRef guidPackage As Guid, szDllPath As String, ByRef pbstrAnnotatedId As String) As Integer

Parameters

szId
String

[in] The resource ID.

guidPackage
Guid

[in] The GUID of the resource package.

szDllPath
String

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

pbstrAnnotatedId
String

[out] An ID string with the correct annotations.

Returns

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"

Applies to