(It's been months, but Danny and Pedro and others were helping me use SHGetSpecialFolderPath or equivalent. History's below, but basically Danny pointed out that various variants appeared to already be in the headers and libraries.)
I finally have this working, but not the way you'd expect. I think there's a bug here somewhere. I'm working in the arm-mingw32ce world, BTW. GetProcAddress() works for SHGetSpecialFolderPath (note spelling: no terminal W or A). In fact, calling SHGetSpecialFolderPath directly works, but first you have to #undef SHGetSpecialFolderPath, because the headers want to turn it into SHGetSpecialFolderPathW. Is it possible there simply isn't an A version? SHGetSpecialFolderPath is returning a wchar_t string for me. I'm testing in the MS emulators, BTW; haven't tested on a real device. If there's a bug it's that the headers reference W and A versions and turn SHGetSpecialFolderPath into one of them. Thanks, --Eric On Fri, Jun 13, 2008 at 05:49:27PM +0200, Danny Backx wrote: > I'll try to give you all the info I have, let me know if I'm missing the > point completely :-) > > On Thu, 2008-06-12 at 21:20 -0700, eehouse.org wrote: > > > Shouldn't you use SHGetSpecialFolderPath() ? > > > > > > I've found little decent reference material to the function you mention, > > > and just about the only relatively official one mentioned that this > > > function is deprecated. > > > > Well, this page says SHGetSpecialFolderPath is superseded by > > ShGetFolderPath: > > > > http://msdn.microsoft.com/en-us/library/bb762204(VS.85).aspx > > > > Frankly, I'll take any that works. :-) > > http://msdn.microsoft.com/en-us/library/bb762181(VS.85).aspx says > the opposite. Oh well. > > > > SHGetSpecialFolderPath is in our coredll.def file, and I remember using > > > it recently in a test program. > > > > In the tree I have it's defined only in the win32, not cegcc, APIs. > > > > ==> find ~/src/cegcc/cegcc/src/ -name '*.def' | xargs grep > > SHGetSpecialFolderPathW > > /home/eehouse/src/cegcc/cegcc/src/w32api/lib/shell32.def:[EMAIL PROTECTED] > dannypc: {30} find . -name \*.def -exec grep SHGetSpecialFolderPath {} \; > -print > SHGetSpecialFolderPath > ./cegcc/importlibs/defs/coredll.def > SHGetSpecialFolderPath > ./mingw/coredll.def > [EMAIL PROTECTED] > [EMAIL PROTECTED] > ./w32api/lib/shell32.def > SHGetSpecialFolderPath > ./w32api/libce/coredll.def > dannypc: {31} > > Also it's there : > > dannypc: {26} > arm-mingw32ce-nm /opt/mingw32ce/arm-mingw32ce/lib/libcoredll.a | grep > Folder > 00000000 T SHGetSpecialFolderPath > 00000000 I __imp_SHGetSpecialFolderPath > dannypc: {27} > > But I sometimes have stuff that's different from SVN :-). The > coredll.def files are in sync though. > > > /home/eehouse/dev/sf/WINCE_SVN/wince/cedict.c:637: undefined reference to > > `SHGetSpecialFolderPathW' > > /home/eehouse/dev/sf/WINCE_SVN/wince/cedict.c:643: undefined reference to > > `FindFirstFlashCard' > > The FindFirstFlashCard function is in -lnote_prj just like MSDN says. > > A very dumb program that demonstrates use of SHGetSpecialFolderPath is > attached. (It takes a while to complete...) I've put the compiled > version on http://danny.backx.info/download/x.exe . > > An example on how to use FindFirstFlashCard is in the roadmap sources > (http://roadmap.cvs.sourceforge.net/roadmap/roadmap/src/win32/roadmap_path.c?view=log). > and an executable containing this is at > http://danny.backx.info/download/roadmap-20080530.tar.gz . You can't see with > objdump that it uses note_prj because it loads it dynamically, see the > source. I was told to do this to avoid WinCE version trouble. > > Danny > -- > Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info -- ****************************************************************************** * From the desktop of: Eric House, [EMAIL PROTECTED] * * Crosswords 4.1.4 for PalmOS now ARM-native: xwords.sourceforge.net * ****************************************************************************** ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel