IVsShell.LoadPackageString Method

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)

Syntax

‘선언
Function LoadPackageString ( _
    ByRef guidPackage As Guid, _
    resid As UInteger, _
    <OutAttribute> ByRef pbstrOut As String _
) As Integer
‘사용 방법
Dim instance As IVsShell
Dim guidPackage As Guid
Dim resid As UInteger
Dim pbstrOut As String
Dim returnValue As Integer

returnValue = instance.LoadPackageString(guidPackage, _
    resid, pbstrOut)
int LoadPackageString(
    ref Guid guidPackage,
    uint resid,
    out string pbstrOut
)
int LoadPackageString(
    [InAttribute] Guid% guidPackage, 
    [InAttribute] unsigned int resid, 
    [OutAttribute] String^% pbstrOut
)
abstract LoadPackageString : 
        guidPackage:Guid byref * 
        resid:uint32 * 
        pbstrOut:string byref -> int 
function LoadPackageString(
    guidPackage : Guid, 
    resid : uint, 
    pbstrOut : String
) : int

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.

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.

.NET Framework Security

See Also

Reference

IVsShell Interface

IVsShell Members

Microsoft.VisualStudio.Shell.Interop Namespace