Hi,
I need to open the PickIconDialog window (I'm using C#).
[DllImport("shell32.dll",CharSet = CharSet.Auto, CallingConvention =
CallingConvention.Winapi)]
public static extern int PickIconDlg(IntPtr hwndOwner,
System.Text.StringBuilder lpstrFile, int nMaxFile, ref int
lpdwIconIndex);
Using the declaration above, it work perfectly in Windows XP but in
Windows 2000 SP4 it gives me the exception
System.EntryPointNotFoundException: Unable to find an entry point
named PickIconDlg in DLL shell32.dll
What am I doing wrong?
Thanks a lot
Andrea
Mattias Sjögren - 19 Nov 2005 18:55 GMT
>What am I doing wrong?
This function wasn't exported by name, only by ordinal, before WinXP.
Try adding EntryPoint = "#62" to the DllImport attribute.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Andrea - 19 Nov 2005 19:11 GMT
>>What am I doing wrong?
>
>This function wasn't exported by name, only by ordinal, before WinXP.
>Try adding EntryPoint = "#62" to the DllImport attribute.
>
>Mattias
Thanks a lot Mattias. It works now.
Andrea