IVsResourceManager.LoadResourceBlob2 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将资源 blob 加载到指定的程序集中。
public:
int LoadResourceBlob2(System::String ^ pszAssemblyPath, int culture, System::String ^ pszResourceName, [Runtime::InteropServices::Out] IntPtr % pBytes, [Runtime::InteropServices::Out] int % lAllocated);
public int LoadResourceBlob2 (string pszAssemblyPath, int culture, string pszResourceName, out IntPtr pBytes, out int lAllocated);
abstract member LoadResourceBlob2 : string * int * string * nativeint * int -> int
Public Function LoadResourceBlob2 (pszAssemblyPath As String, culture As Integer, pszResourceName As String, ByRef pBytes As IntPtr, ByRef lAllocated As Integer) As Integer
参数
- pszAssemblyPath
- String
中要在其中加载资源的程序集的路径。
- culture
- Int32
中指定资源有效的区域性的 LCID 值。 如果提供的值为0,则将选择用户在启动应用程序时选择的 LCID。
- pszResourceName
- String
中资源的名称。
- pBytes
-
IntPtr
nativeint
弄Blob 的大小(以字节为单位)。
- lAllocated
- Int32
弄为 blob 分配的字节数。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
LoadResourceBlob 返回的缓冲区由 Win32 系统调用 CoTaskMemAlloc 分配,并且必须由具有 CoTaskMemFree 的调用方释放。
COM 签名
从 vsshell80:
HRESULT LoadResourceBlob2(
[in, string] LPCOLESTR pszAssemblyPath,
[in] int culture,
[in, string] LPCOLESTR pszResourceName,
[out] BYTE **pBytes,
[out] long *lAllocated
);