[DllImport("shell32.dll", CharSet=CharSet.Unicode)]
private static extern int PickIconDlg(IntPtr hwndOwner, System.Text.StringBuilder lpstrFile, int nMaxFile, ref int lpdwIconIndex);
TODO?
This function behaves differently on 9x/ME than on Windows NT->XP
Please add some!
string iconfile;
int iconindex = 0;
int retval;
System.Text.StringBuilder sb;
iconfile = Environment.GetFolderPath(Environment.SpecialFolder.System);
iconfile = iconfile + @"\shell32.dll";
sb = new System.Text.StringBuilder(iconfile, 500);
retval = PickIconDlg(this.Handle, sb, sb.Length, ref iconindex);
iconfile = sb.ToString();
Shouldn't it look like this:
retval = PickIconDlg(this.Handle, sb, sb.Capacity, ref iconindex);