Article View: borland.public.cppbuilder.nativeapi
Article #13819Re: SpecialFolderLocation!
From: Safari
Date: Tue, 16 Sep 2003 22:31
Date: Tue, 16 Sep 2003 22:31
27 lines
2133 bytes
2133 bytes
Thanks Remy,
Safari
Remy Lebeau (TeamB) wrote:
> "Safari" <Safari@alloymail.com> wrote in message
> news:3F67661C.4060309@alloymail.com...
>
> Again and again, I suggest that you TEST THE RETURN VALUE of
> SHGetSpecialFolderLocation() before calling SHGetPathFromIDList(). I don't
> reiterate this point for my health, you know :-p.
>
> AnsiString __fastcall GetPaths(int Path)
> {
> LPITEMIDLIST idList = NULL;
> char idPath[MAX_PATH + 1] = {0};
> AnsiString result;
>
> if( SHGetSpecialFolderLocation(0, Path, &idList) == NOERROR )
> {
> if( SHGetPathFromIDList(idList, idPath) )
> result = idPath;
>
> CoTaskMemFree(idList);
> }
>
> return result;
> }
Technical Details
Message-ID:
<3F678F3D.4070408@alloymail.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3F63A478.1080901@alloymail.com> <3f639f01$1@newsgroups.borland.com> <3f63b367@newsgroups.borland.com> <3f63b711$1@newsgroups.borland.com> <3f64f6e9@newsgroups.borland.com> <3f64f99a$1@newsgroups.borland.com> <3f652cf8@newsgroups.borland.com> <3f65320b$1@newsgroups.borland.com> <3F67661C.4060309@alloymail.com> <3f6788ed$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,64d61a6d0b62f704 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-16 15:40:14 PST Message-ID: <3F678F3D.4070408@alloymail.com> Date: Wed, 17 Sep 2003 03:01:25 +0430 From: Safari <Safari@alloymail.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: SpecialFolderLocation! References: <3F63A478.1080901@alloymail.com> <3f639f01$1@newsgroups.borland.com> <3f63b367@newsgroups.borland.com> <3f63b711$1@newsgroups.borland.com> <3f64f6e9@newsgroups.borland.com> <3f64f99a$1@newsgroups.borland.com> <3f652cf8@newsgroups.borland.com> <3f65320b$1@newsgroups.borland.com> <3F67661C.4060309@alloymail.com> <3f6788ed$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 194.225.63.193 X-Trace: newsgroups.borland.com 1063751482 194.225.63.193 (16 Sep 2003 15:31:22 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail