IVsResourceManager.LoadResourceBlob2 Method

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

Syntax

声明
Function LoadResourceBlob2 ( _
    pszAssemblyPath As String, _
    culture As Integer, _
    pszResourceName As String, _
    <OutAttribute> ByRef pBytes As IntPtr, _
    <OutAttribute> ByRef lAllocated As Integer _
) As Integer
用法
Dim instance As IVsResourceManager
Dim pszAssemblyPath As String
Dim culture As Integer
Dim pszResourceName As String
Dim pBytes As IntPtr
Dim lAllocated As Integer
Dim returnValue As Integer

returnValue = instance.LoadResourceBlob2(pszAssemblyPath, _
    culture, pszResourceName, pBytes, _
    lAllocated)
int LoadResourceBlob2(
    string pszAssemblyPath,
    int culture,
    string pszResourceName,
    out IntPtr pBytes,
    out int lAllocated
)
int LoadResourceBlob2(
    [InAttribute] String^ pszAssemblyPath, 
    [InAttribute] int culture, 
    [InAttribute] String^ pszResourceName, 
    [OutAttribute] IntPtr% pBytes, 
    [OutAttribute] int% lAllocated
)
abstract LoadResourceBlob2 : 
        pszAssemblyPath:string * 
        culture:int * 
        pszResourceName:string * 
        pBytes:IntPtr byref * 
        lAllocated:int byref -> int 
function LoadResourceBlob2(
    pszAssemblyPath : String, 
    culture : int, 
    pszResourceName : String, 
    pBytes : IntPtr, 
    lAllocated : int
) : int

Parameters

  • pszAssemblyPath
    Type: System.String
    Path to the assembly where the resource is to be loaded.
  • culture
    Type: System.Int32
    A LCID value specifying the culture for which the resource is valid. Supplying a value of 0 will select the LCID that the user selected when the application was started.
  • lAllocated
    Type: System.Int32%
    Number of bytes allocated for the blob.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

The buffer returned by LoadResourceBlob is allocated by the Win32 system call CoTaskMemAlloc and must be freed by the caller with CoTaskMemFree.

COM Signature

From vsshell80.idl:

HRESULT LoadResourceBlob2(
   [in, string] LPCOLESTR pszAssemblyPath,
   [in] int culture,
   [in, string] LPCOLESTR pszResourceName,
   [out] BYTE **pBytes,
   [out] long *lAllocated
);

.NET Framework Security

See Also

Reference

IVsResourceManager Interface

IVsResourceManager Members

Microsoft.VisualStudio.Shell.Interop Namespace