N
news
Im using this construction, for getting num of icons contained in specified
file. But it is not working. Function returns 0. Where is the problem???
[DllImport("SHELL32.DLL", EntryPoint="ExtractIconEx", SetLastError=true,
CharSet=CharSet.Unicode, ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern IntPtr ExtractIconEx(string lpszFile, int nIconIndex,
IntPtr phiconLarge, IntPtr phiconSmall, int nIcons);
public void GetIconFromFile()
{
string path = @"C:\WINDOWS\System32\shell32.dll";
IntPtr smallIcon = IntPtr.Zero;
IntPtr largeIcon = IntPtr.Zero;
int i = ExtractIconEx(path , -1, smallIcon, largeIcon , -1).ToInt32();
}
Thanks
M.Endys
file. But it is not working. Function returns 0. Where is the problem???
[DllImport("SHELL32.DLL", EntryPoint="ExtractIconEx", SetLastError=true,
CharSet=CharSet.Unicode, ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern IntPtr ExtractIconEx(string lpszFile, int nIconIndex,
IntPtr phiconLarge, IntPtr phiconSmall, int nIcons);
public void GetIconFromFile()
{
string path = @"C:\WINDOWS\System32\shell32.dll";
IntPtr smallIcon = IntPtr.Zero;
IntPtr largeIcon = IntPtr.Zero;
int i = ExtractIconEx(path , -1, smallIcon, largeIcon , -1).ToInt32();
}
Thanks
M.Endys