Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'宣言
Function LoadResourceIcon2 ( _
pszAssemblyPath As String, _
culture As Integer, _
pszResourceName As String, _
cx As Integer, _
cy As Integer, _
<OutAttribute> ByRef hicoValue As IntPtr _
) As Integer
'使用
Dim instance As IVsResourceManager
Dim pszAssemblyPath As String
Dim culture As Integer
Dim pszResourceName As String
Dim cx As Integer
Dim cy As Integer
Dim hicoValue As IntPtr
Dim returnValue As Integer
returnValue = instance.LoadResourceIcon2(pszAssemblyPath, _
culture, pszResourceName, cx, cy, _
hicoValue)
int LoadResourceIcon2(
string pszAssemblyPath,
int culture,
string pszResourceName,
int cx,
int cy,
out IntPtr hicoValue
)
int LoadResourceIcon2(
[InAttribute] String^ pszAssemblyPath,
[InAttribute] int culture,
[InAttribute] String^ pszResourceName,
[InAttribute] int cx,
[InAttribute] int cy,
[OutAttribute] IntPtr% hicoValue
)
function LoadResourceIcon2(
pszAssemblyPath : String,
culture : int,
pszResourceName : String,
cx : int,
cy : int,
hicoValue : IntPtr
) : int
Parameters
pszAssemblyPath
Type: System.StringPath to the assembly where the resource is to 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.
cx
Type: System.Int32Width of the icon.
cy
Type: System.Int32Height of the icon.
hicoValue
Type: System.IntPtr%Pointer to the resource.
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 vsshell80.idl:
[local] HRESULT LoadResourceIcon2(
[in, string] LPCOLESTR pszAssemblyPath,
[in] int culture,
[in, string] LPCOLESTR pszResourceName,
[in] int cx,
[in] int cy,
[out, retval] HICON *hicoValue)
;
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.