Article View: borland.public.cppbuilder.nativeapi
Article #515Re: Please Pb with folder with Vista
From: patrickartaud
Date: Fri, 25 Jan 2008 16:54
Date: Fri, 25 Jan 2008 16:54
76 lines
3859 bytes
3859 bytes
Thank you very much for all this I go to look at.
Whan I need "mine folders or subfolders where they are .db Files I use the
same code for the start of the .cpp of a .dll and after I use
extern Ansi ChVista for all the cpp files of the .exe or dll.
And did it work for XP too?Thank you Or I must have a XP version an Vista
version?
And please where could I find enougth simplist explanations for Vista
because I have tried in "msdn" and in all page there are a lot off links and
I don't know where to go or there is only this mean?
Thank you again
Best Regards
Patrick Artaud
PS: Re Excuse me for my English (I try!!!!)
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> a οΏ½crit dans le message de
news:4798da20$1@newsgroups.borland.com...
>
> "patrickartaud" <patrickartaud@aidedecision.com> wrote in message
> news:4798bade@newsgroups.borland.com...
>
>> I use this code :
> <snip>
>
> There are some potential bugs in that code. Try this instead:
>
> LPITEMIDLIST List = NULL;
> AnsiString Full;
>
> if( SHGetSpecialFolderLocation(0, CSIDL_APPDATA, &List) == 0 )
> {
> char Path[MAX_PATH+1] = {0};
> if( SHGetPathFromIDList(List, Path) )
> {
> Full = IncludeTrailingBackslash(Path) + societe;
> ForceDirectories(Full);
> }
> }
>
> ChVista = Full;
>
>> It is ok I have
>> Document and setting\Patrick\Application Data in ChVista
>
> Under Vista, CSIDL_APPDATA it should be returning the complete path to the
> user's "Roaming" folder. Vista doesn't even have a "Document and
> Settings" folder like XP did.
>
>> But when I launch my application it put the folders and subfolders
>> in Document and setting\Patrick\Application Data\Roaming
>
> That is what it is supposed to do. The "Roaming" folder is the actual
> CSIDL_APPDATA folder under Vista. Refer to MSDN for details:
>
> CSIDL
> http://msdn2.microsoft.com/en-us/library/bb762494.aspx
>
> KNOWNFOLDERID
> http://msdn2.microsoft.com/en-us/library/bb762584(VS.85).aspx
>
> Under Vista, you should be using KNOWNFOLDERIDs instead of CSIDLs now.
>
>> And my application dont find the folders.
>
> Please show your actual code for accessing the files. The path returned
> by SHGetSpecialFolderLocation() is a valid folder path and should be used
> as-is with whatever subfolders you need to add to it. When your code
> fails, you are probably not actually accessing the folder you think you
> are accessing.
>
>> I don't understand why it add this subfolder Roaming because in
>> ChVista it stop at application data or it is a wrong CSIDL?
>
> That is likely Vista's "Folder Redirection" feature at work.
>
>
> Gambit
>
Technical Details
Message-ID:
<479a1456$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4798bade@newsgroups.borland.com> <4798da20$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7ff0773a78f53a87 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII From: "patrickartaud" <patrickartaud@aidedecision.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4798bade@newsgroups.borland.com> <4798da20$1@newsgroups.borland.com> In-Reply-To: <4798da20$1@newsgroups.borland.com> Subject: Re: Please Pb with folder with Vista Date: Fri, 25 Jan 2008 17:54:44 +0100 Lines: 77 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 NNTP-Posting-Host: 82.228.58.174 Message-ID: <479a1456$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1201280086 82.228.58.174 (25 Jan 2008 08:54:46 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail