🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2883

Get location of My Documents

#2883
From: Randy
Date: Tue, 19 Dec 2006 22:10
16 lines
1441 bytes
Whats the accepted way to get the location of the current user's My 
Documents folder? I'm trying to use:

#include <shlobj.h>

   LPITEMIDLIST pidl;
   if( SHGetSpecialFolderLocation(Handle,CSIDL_PERSONAL,&pidl) == NOERROR)
   {
       char buf[MAX_PATH];

       SHGetPathFromIDList(pidl,buf);
       String sFolderString = buf;
}

but I'm getting compiler errors from shobjidl.h for duplicate symbols 
under BCB6. Should I be using a different header?
Technical Details
Message-ID: <4588631d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!news.datemas.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9a6b1f5d22c8ccdc,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 19 Dec 2006 17:10:37 -0500
From: Randy <banjolicious@netscape.net>
User-Agent: Thunderbird 1.5.0.8 (Windows/20061025)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Get location of My Documents
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 65.40.171.196
Message-ID: <4588631d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1166566173 65.40.171.196 (19 Dec 2006 14:09:33 -0800)
Lines: 16
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!news.datemas.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail