Shell32ExtractIconEx Method
Creates an array of handles to large or small icons extracted from the specified executable file, DLL, or icon file.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Shell32.dll", CharSet = CharSet.Unicode)]
public static int ExtractIconEx(
string file,
int uconIndex,
IntPtr[] hiconLarge,
IntPtr[] hiconSmall,
int iconsCount
)
<DllImportAttribute("Shell32.dll", CharSet := CharSet.Unicode>]
Public Shared Function ExtractIconEx (
file As String,
uconIndex As Integer,
hiconLarge As IntPtr(),
hiconSmall As IntPtr(),
iconsCount As Integer
) As Integer
Dim file As String
Dim uconIndex As Integer
Dim hiconLarge As IntPtr()
Dim hiconSmall As IntPtr()
Dim iconsCount As Integer
Dim returnValue As Integer
returnValue = Shell32.ExtractIconEx(file,
uconIndex, hiconLarge, hiconSmall,
iconsCount)
public:
[DllImportAttribute(L"Shell32.dll", CharSet = CharSet::Unicode)]
static int ExtractIconEx(
String^ file,
int uconIndex,
array<IntPtr>^ hiconLarge,
array<IntPtr>^ hiconSmall,
int iconsCount
)
[<DllImportAttribute("Shell32.dll", CharSet = CharSet.Unicode)>]
static member ExtractIconEx :
file : string *
uconIndex : int *
hiconLarge : IntPtr[] *
hiconSmall : IntPtr[] *
iconsCount : int -> int
No code example is currently available or this language may not be supported.
- file String
-
Pointer to a null-terminated string that specifies the name of an executable file,
DLL, or icon file from which icons will be extracted.
- uconIndex Int32
-
Specifies the zero-based index of the first icon to extract.
For example, if this value is zero, the function extracts the first icon in the specified file.
If this value is –1 and hiconLarge and
hiconSmall are both ,
the function returns the total number of icons in the specified file.
If the file is an executable file or DLL, the return value is the number of RT_GROUP_ICON resources.
If the file is an .ico file, the return value is 1.
- hiconLarge IntPtr
-
Pointer to an array of icon handles that receives handles to the large icons extracted from the file.
If this parameter is , no large icons are extracted from the file.
- hiconSmall IntPtr
-
Pointer to an array of icon handles that receives handles to the small icons extracted from the file.
If this parameter is , no small icons are extracted from the file.
- iconsCount Int32
-
The number of icons to extract from the file.
Int32
If the nIconIndex parameter is
-1,
the
hiconLarge parameter is
,
and the
hiconSmall parameter is
,
then the return value is the number of icons contained in the specified file.
Otherwise, the return value is the number of icons successfully extracted from the file.