Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / November 2005

Tip: Looking for answers? Try searching our database.

Using the PickIconDialog with Windows 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrea - 19 Nov 2005 18:40 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.