IVsShell::LoadPackageString Method (Guid, UInt32, String^)

 

Directly loads a localized string from a VSPackage satellite DLL.

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

int LoadPackageString(
	[InAttribute] Guid% guidPackage,
	unsigned int resid,
	[OutAttribute] String^% pbstrOut
)

Parameters

guidPackage
Type: System::Guid

[in] Unique identifier of the VSPackage whose UI DLL contains the string specified to load.

resid
Type: System::UInt32

[in] Identifier of the string table resource.

pbstrOut
Type: System::String^

[out, retval] Pointer to the requested string.

Return Value

Type: System::Int32

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

From vsshell.idl:

HRESULT IVsShell::LoadPackageString(
   [in] REFGUID guidPackage,
   [in] ULONG resid,
   [out, retval] BSTR *pbstrOut
);

This method is a helper utility — a shortcut for calling the LoadUILibrary LoadResourceString. The Win API caller is responsible for calling SysFreeString to free the allocated pbstrOut string. This method uses the LoadUILibrary method to load the localized string as a string resource. You can also manually load the string resource.

Return to top
Show: