IVsResourceManager2.ParseResourceID Method

Definition

Parses a resource ID (which may contain an embedded package GUID or DLL path) into its components.

public:
 int ParseResourceID(System::String ^ szId, System::UInt32 lcid, [Runtime::InteropServices::Out] System::String ^ % pbstrUnadornedId, [Runtime::InteropServices::Out] Guid % pguidPackage, [Runtime::InteropServices::Out] System::String ^ % pbstrDllPath);
public int ParseResourceID (string szId, uint lcid, out string pbstrUnadornedId, out Guid pguidPackage, out string pbstrDllPath);
abstract member ParseResourceID : string * uint32 * string * Guid * string -> int
Public Function ParseResourceID (szId As String, lcid As UInteger, ByRef pbstrUnadornedId As String, ByRef pguidPackage As Guid, ByRef pbstrDllPath As String) As Integer

Parameters

szId
String

[in] String containing the ID of the resource.

lcid
UInt32

[in] The local ID for the resource.

pbstrUnadornedId
String

[out] The resource ID string.

pguidPackage
Guid

[out] The GUID for the resource.

pbstrDllPath
String

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

Returns

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

Remarks

The resource ID can be an embedded package GIUD or a DLL path. The syntax is:

<prefix><resID>[;<source>]

  • prefix is "@" for managed resources or "#" for native resources.

  • resID is the name or numeric ID of the resource.

  • source is a package GUID (in curly braces) or a DLL path.

DLL paths may contain the tokens, "%lcid%" and "%lang%"; these are expanded to the numeric value of the current locale (for example "1033") and the primary language from the locale name (for example "en"), respectively. If 'lcid' is -1, the current thread locale will be used.

If szID begins with a prefix character, this method sets pbstrUnadornedId to the portion to the left of the semicolon. If there is a semicolon, either pguidPackage or pbstrDllPath will be set to the portion to the right of the semicolon, depending on the type of ID string.

Applies to