IVsResourceManager2::AnnotateIDIfNecessary Method (String^, Guid, String^, String^)
Creates an annotated resource ID.
Assembly: Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)
int AnnotateIDIfNecessary(
String^ szId,
[InAttribute] Guid% guidPackage,
String^ szDllPath,
[OutAttribute] String^% pbstrAnnotatedId
)
Parameters
- szId
-
Type:
System::String^
[in] The resource ID.
- 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::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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" |