Udostępnij za pośrednictwem


IVsShell.LoadPackageString(Guid, UInt32, String) Method

Definition

Directly loads a localized string from a VSPackage satellite DLL.

public:
 int LoadPackageString(Guid % guidPackage, System::UInt32 resid, [Runtime::InteropServices::Out] System::String ^ % pbstrOut);
public int LoadPackageString (ref Guid guidPackage, uint resid, out string pbstrOut);
abstract member LoadPackageString : Guid * uint32 * string -> int
Public Function LoadPackageString (ByRef guidPackage As Guid, resid As UInteger, ByRef pbstrOut As String) As Integer

Parameters

guidPackage
Guid

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

resid
UInt32

[in] Identifier of the string table resource.

pbstrOut
String

[out, retval] Pointer to the requested string.

Returns

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

Remarks

COM Signature

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.

Applies to