Loads an image from the specified resource or image cache if the
image was previously loaded into memory.
Namespace:
Microsoft.ConfigurationManagement.AdminConsole.Common
Assembly:
Microsoft.ConfigurationManagement.ManagementProvider (in
microsoft.configurationmanagement.managementprovider.dll)
Usage
Visual Basic |
Dim resourcePath As AssemblyDescription
Dim iconResource As String
Dim iconImage As Icon
Dim returnValue As Boolean
returnValue = UtilityClass.TryGetImageFromResource(resourcePath, iconResource, iconImage)
|
Syntax
Visual Basic |
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name:="FullTrust")> _
<PermissionSetAttribute(SecurityAction.LinkDemand, Name:="FullTrust")> _
Public Shared Function TryGetImageFromResource ( _
resourcePath As AssemblyDescription, _
iconResource As String, _
<OutAttribute> ByRef iconImage As Icon _
) As Boolean
|
C# |
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name="FullTrust")]
[PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust")]
public static bool TryGetImageFromResource (
AssemblyDescription resourcePath,
string iconResource,
out Icon iconImage
)
|
C++ |
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name=L"FullTrust")]
[PermissionSetAttribute(SecurityAction::LinkDemand, Name=L"FullTrust")]
public:
static bool TryGetImageFromResource (
AssemblyDescription^ resourcePath,
String^ iconResource,
[OutAttribute] Icon^% iconImage
)
|
J# |
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name="FullTrust") */
/** @attribute PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust") */
public static boolean TryGetImageFromResource (
AssemblyDescription resourcePath,
String iconResource,
/** @attribute OutAttribute() */ /** @ref */ Icon iconImage
)
|
Parameters
- resourcePath
-
[in]
AssemblyDescription object that defines an assembly.
- iconResource
-
[in] Name of an icon resource.
- iconImage
-
[out] System.Drawing.Icon object that represents the icon
image.
Return Value
true if the image is loaded; otherwise
false..
Thread Safety
Any public static (Shared in Visual
Basic) members of this type are thread safe. Any instance members
are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2003,Windows Vista
See Also