Article View: borland.public.cppbuilder.nativeapi
Article #4489SHGetFolderPath generates errors in header file
From: Kris
Date: Sun, 15 Jan 2006 19:11
Date: Sun, 15 Jan 2006 19:11
35 lines
1854 bytes
1854 bytes
I'm attempting to compile following code : TCHAR szPath[MAX_PATH]; SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, szPath); In order to make this work you need to use #include "shlobj.h" However, adding this include generates lots of errors : [C++ Error] shobjidl.h(2372): E2238 Multiple declaration for 'FOLDERSETTINGS' [C++ Error] shobjidl.h(8279): E2238 Multiple declaration for 'DESKBANDINFO' [C++ Error] shlobj.h(1487): E2238 Multiple declaration for 'FVSHOWINFO' [C++ Warning] shlobj.h(3487): W8017 Redefinition of 'DI_GETDRAGIMAGE' is not identical [C++ Error] shlobj.h(4992): E2238 Multiple declaration for 'SHELLFLAGSTATE' Any ideas on how to solve this ? I've read somewhere that an extra define should to the trick : #define NO_WIN32_LEAN_AND_MEAN #include "shlobj.h" But unfortunately it didn't for me and I still got the same errors... Kris PS : Don't know if this matters, but I'm using C++ builder 2006.
Technical Details
Message-ID:
<b47ls1lmu1c0qs74336v76ddlgo20h4n2k@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,eb598d5296eede42,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Kris <x.y@xyz.xx> Newsgroups: borland.public.cppbuilder.nativeapi Subject: SHGetFolderPath generates errors in header file Date: Sun, 15 Jan 2006 20:11:22 +0100 Message-ID: <b47ls1lmu1c0qs74336v76ddlgo20h4n2k@4ax.com> X-Newsreader: Forte Free Agent 3.1/32.783 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 81.11.237.119 X-Trace: newsgroups.borland.com 1137352116 81.11.237.119 (15 Jan 2006 11:08:36 -0700) Lines: 36 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail