🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: SpecialFolderLocation!

#13886
From: Safari
Date: Sun, 14 Sep 2003 23:25
20 lines
1593 bytes
Thanks,
I will try to use.

Safari

"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
news:3f64e30b$1@newsgroups.borland.com...
|
| I should point out that there are two other problems with this code:
|
| 1) your buffer should be MAX_PATH+1, in case SHGetPathFromIDList() returns
a
| path that is exactly MAX_PATH in length, thus losing the null terminator
|
| 2) you have a memory leak as you are never freeing the ITEMIDLIST that
| SHGetSpecialFolderLocation() returns.  You must use CoTaskMemFree() or
| IMalloc::Free() in order to free the memory correctly *before* you return
| from the function.
|
| Gambit
Technical Details
Message-ID: <3f64f8c1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3F649347.7090500@alloymail.com> <3f64e30b$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-14 16:27:48 PST
From: "Safari" <Safari@alloymail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3F649347.7090500@alloymail.com> <3f64e30b$1@newsgroups.borland.com>
Subject: Re: SpecialFolderLocation!
Date: Mon, 15 Sep 2003 03:55:06 +0430
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 194.225.63.198
Message-ID: <3f64f8c1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063581889 194.225.63.198 (14 Sep 2003 16:24:49 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail