Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'宣言
Function LoadResourceBlob ( _
ByRef guidPackage As Guid, _
culture As Integer, _
pszResourceName As String, _
<OutAttribute> ByRef pBytes As IntPtr, _
<OutAttribute> ByRef lAllocated As Integer _
) As Integer
'使用
Dim instance As IVsResourceManager
Dim guidPackage As Guid
Dim culture As Integer
Dim pszResourceName As String
Dim pBytes As IntPtr
Dim lAllocated As Integer
Dim returnValue As Integer
returnValue = instance.LoadResourceBlob(guidPackage, _
culture, pszResourceName, pBytes, _
lAllocated)
int LoadResourceBlob(
ref Guid guidPackage,
int culture,
string pszResourceName,
out IntPtr pBytes,
out int lAllocated
)
int LoadResourceBlob(
[InAttribute] Guid% guidPackage,
[InAttribute] int culture,
[InAttribute] String^ pszResourceName,
[OutAttribute] IntPtr% pBytes,
[OutAttribute] int% lAllocated
)
function LoadResourceBlob(
guidPackage : Guid,
culture : int,
pszResourceName : String,
pBytes : IntPtr,
lAllocated : int
) : int
Parameters
guidPackage
Type: System.Guid%Guid of the package into which the resource will be loaded.
culture
Type: System.Int32A 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.
pszResourceName
Type: System.StringThe name of the resource.
pBytes
Type: System.IntPtr%Size in bytes of the blob.
lAllocated
Type: System.Int32%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 LoadResourceBlob(
[in] REFGUID guidPackage,
[in] int culture,
[in, string] LPCOLESTR pszResourceName,
[out] BYTE **pBytes,
[out] long *lAllocated)
;)
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.